What is Putlog in SAS?
The PUTLOG statement writes a message that you specify to the SAS log. The PUTLOG statement is also helpful when you use macro-generated code because you can send output to the SAS log without affecting the current file destination.
How do you use %put in SAS?
%put One line of text.; %put %str(Use a semicolon(;) to end a SAS statement.); %put %str(Enter the student%’s address.); When you submit these statements, these lines appear in the SAS log: One line of text. Use a semicolon(;) to end a SAS statement.
How do you write logs in SAS?
You can also write to the log by using the PUT statement or the LIST statement within a DATA step. You can also use the %PUT macro statement anywhere in your program. These statements can be used to debug your SAS programs.
How do you display the value of a variable in SAS?
Do you want to see the contents of the macro variable &var? Then use %put(&var) . If, however, you want to see the contents of the SAS data step variable whose name is stored in &var , then use put(&var) .
What is SAS LOG?
The SAS log is a record of everything that you do in your SAS session or with your SAS program. Depending on the setting of SAS system options, the method of running SAS, and the program statements that you specify, the log can include the following types of information: program statements.
How do I find the value of a macro variable in SAS?
You can also use a %PUT Macro Statement to view available macro variables. %PUT provides several options that enable you to view individual categories of macro variables. The system option SYMBOLGEN displays the resolution of macro variables.
What is the difference between Symput and Symget?
Simply put, SYMPUT is a SAS language routine that assigns a value produced in a DATA step to a macro variable. Conversely, SYMGET is a SAS language function that returns the value of a macro variable to the DATA step during DATA step execution.
What is SAS date value?
SAS date value is a value that represents the number of days between January 1, 1960, and a specified date. SAS can perform calculations on dates ranging from A.D. 1582 to A.D. 19,900. Dates before January 1, 1960, are negative numbers; dates after are positive numbers.
What is putlog in SAS?
The PUTLOG statement writes a message that you specify to the SAS log. The PUTLOG statement is also helpful when you use macro-generated code because you can send output to the SAS log without affecting the current file destination. The PUTLOG statement is similar to the ERROR statement except that PUTLOG does not set _ERROR_ to 1.
What is the use of% put in SAS?
%PUT is a SAS macro program statement that is independent of the DATA step and can be used anywhere. writes a user-specified message to the SAS log. Use the PUTLOG statement in a DATA step. writes to the SAS log the input data records for the data line that is being processed.
What does write do in SAS log?
writes selected lines (including text strings and DATA step variable values) to the SAS log in the current iteration of a DATA step. If a FILE statement with the LOG destination executes before a PUT statement, the PUT statement output is directed to a destination that is specified by the FILE statement.
How are logs rolled over in SAS?
Logs can be rolled over automatically, when a SAS session starts, when the log has reached a specific size, or not at all. By using formatting directives in the SAS log name, each SAS log can be named with unique identifiers.