SAS Logs Analysis

  • Components of SAS LOG: SAS log includes mainly any data steps or procedures that have been executed, any ERRORS (might be kind of syntax, compilation, data, programming or logical errors), WARNINGS, NOTES etc.

  • In addition SAS LOG will also display information about timing of execution for each data step or proc step like CPU time, real time etc.

  • PUT _ALL_; /* writes PDV into output log */

  • LIST statement writes current input buffer in to the log

  • OPTION SOURCE/NOSOURCE or SOURCE2/NOSOURCE2 – these options toggles between whether to show the source code in the log or not.

  • OPTION NOTE/ NONOTE – similar to above but in case of NOTES only

  • OPTION ERRORS = 20 This will restrict number of data error messages to be displayed in the log. Note it will only restrict data error messages not programming or logical errors at the run time.

  • OPTION Symbolgen/Nosymbolgen - This option enables SAS to provide the macro variables values evaluated at every step of their usage.

  • OPTION MLOGIC/NOMLOGIC- This option enables SAS to describe the execution of macro. This includes beginning and ending for macro execution; any if-else or other conditional logic, values of macro parameter invocation and description of each macro execution step.

  • OPTION MPRINT/NOMPRINT- With this option SAS displays code for each macro step generated after evaluating macro variables.