Chapter Contents |
Previous |
Next |
Structure of the Log |
For example, in the following output, the number 1 prints to the left of the OPTIONS statement. This means that it is the first line in the program. In interactive mode, SAS continues with the sequence of line numbering until you end your session. If you submit the program again (or submit other programs in your current SAS session), the first program line number will be the next consecutive number.
Operating Environment Information: The SAS log appears differently depending on your operating environment. See the SAS documentation for your operating environment.
Sample SAS Log
NOTE: Copyright (c) 1999 by SAS Institute Inc., Cary, NC, USA. [1] NOTE: SAS (r) Proprietary Software Version 8 (TS00.00P1D06081999) [2] Licensed to SAS Institute Inc., Site 0000000001. [3] NOTE: This session is executing on the HP-UX B.10.20 platform. [4] NOTE: Running on HP Model 9000/782 Serial Number 2011922219. [5] NOTE: SAS initialization used: real time 4.20 seconds cpu time 1.18 seconds 1 options pagesize=24 linesize=64 nodate; [6] 2 3 data logsample; [7] 4 infile '/u/abcdef/testdir/sampledata.dat'; 5 input LastName $ 1-12 ID $ Gender $ Birth : date7. [8] 5 ! score1 score2 score3 6 score 6 ! 4 score5 score6; 7 format Birth mmddyy8.; 8 run; NOTE: The infile '/u/abcdef/testdir/sampledata.dat' is: [9] File Name=/u/abcdef/testdir/sampledata.dat, Owner Name=abcdef,Group Name=pubs, Access Permission=rw-r--r--, File Size (bytes)=296 NOTE: 5 records were read from the infile [10] '/u/abcdef/testdir/sampledata.dat'. The minimum record length was 58. The maximum record length was 59. NOTE: The data set WORK.LOGSAMPLE has 5 observations and 10 variables. [11] NOTE: DATA statement used: real time 0.44 seconds cpu time 0.13 seconds 9 10 proc sort data=logsample; [12] 11 by LastName; 12 NOTE: There were 5 observations read from the dataset WORK.LOGSAMPLE. NOTE: The data set WORK.LOGSAMPLE has 5 observations and 10 variables. [13] NOTE: PROCEDURE SORT used: real time 0.16 seconds cpu time 0.03 seconds 13 proc print data=logsample; [14] 14 by LastName; 15 run; NOTE: There were 5 observations read from the dataset WORK.LOGSAMPLE. NOTE: PROCEDURE PRINT used: real time 0.31 seconds cpu time 0.05 seconds |
The following list corresponds to the bracketed numbers in the SAS log shown above:
[1] copyright information. | |
[2] SAS system release used to run this program. | |
[3] name and site number of the computer installation where the program ran. | |
[4] platform used to run the program. | |
[5] hardware used to run the program. | |
[6] OPTIONS statement. This statement uses SAS system options to set a page size of 24 and a line size of 64, and to suppress the date in the output. | |
[7] SAS statements that make up the program (if the SAS system option SOURCE is enabled). | |
[8] long statement continued to the next line. Note that the continuation line is preceded by an exclamation point (!), and that the line number does not change. | |
[9] input file information-notes or warning messages about the raw data and where they were obtained (if the SAS system option NOTES is enabled). | |
[10] the number and record length of records read from the input file (if the SAS system option NOTES is enabled). | |
[11] SAS data set that your program created; notes that contain the number of observations and variables for each data set created (if the SAS system option NOTES is enabled). | |
[12] procedure that sorts your data set | |
[13] note about the sorted SAS data set | |
[14] procedure that prints your data set. |
Writing to the Log |
You can instruct SAS to write additional information to the log by using the following statements:
FILE LOG;
statement. Use the PUT, LIST, and ERROR statements in combination with conditional processing to debug DATA steps by writing selected information to the log.
Customizing the Log |
The following list describes some of the SAS system options that you can use to alter the contents of the log:
For more information about how to use these and other SAS system options, see "SAS System Options" in SAS Language Reference: Dictionary.
Operating Environment Information: See the documentation for your operating environment
for other options that affect log output.
DATE system option | controls whether the date and time that the SAS job began are printed at the top of each page of the SAS log and any print file created by SAS. | ||||
FILE statement | enables you to write the results of PUT statements
to an external file. You can use the following two options in the FILE statement
to customize the log for that report.
Note: FILE statement options apply only to the output specified
in the FILE statement, whereas the LINESIZE= and PAGESIZE= SAS system options
apply to all subsequent listings. | ||||
LINESIZE= system option | specifies the line size (printer line width) for the SAS log and the SAS procedure output file that are used by the DATA step and procedures. | ||||
MISSING= system option | specifies the character to be printed for missing numeric variable values. | ||||
NUMBER system option | controls whether the page number prints on the first title line of each page of printed output. | ||||
PAGE statement | skips to a new page in the SAS log and continues printing from there. | ||||
PAGESIZE= system option | specifies the number of lines that you can print per page of SAS output. | ||||
SKIP statement | skips a specified number of lines in the SAS log. |
Operating Environment Information: The range of values for the FILE statement and for SAS system options depends on your operating environment. See the SAS documentation for your operating environment for more information.
For more information about how to use these and other SAS system options and statements, see "SAS System Options" and "Statements" in SAS Language Reference: Dictionary.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.