Section 3.2: Options to alter the Contents of the Log Window When you submit commands that produce large quantities of messages to the log window or your want to run application that works on a regular basis without changes, you can suppress portions or nearly everything that is printed in the log file. SAS system options enable you to suppress SAS statements and system messages. All options set with the OPTIONS statement remain in effect for the duration of a session or until a new OPTIONS statement is entered to change them. And as a warning, do not suppress messages sent to the log window until you have successfully tested the sequence of commands to your satisfaction without errors. OPTIONS to reduce the size of LOG files: With SAS command files that run many DATA or PROC steps or an application that is run on a regular basis without changes, you may want to suppress portions or most of the contents typically written to the log window when you are certain the statements work as intended. These options enable you not show SAS statements and system messages, as well as to limit the number of error messages reported of a particular type. Each option to reduce log file content begins with the two letters 'No', e.g. NoSource, NoNotes, etc, for example: OPTIONS Nosource Nonotes; You can reinstate the function of these options with the 'No' removed from each option: OPTIONS source notes; Contrary to the options which help you detect errors, eliminating them when you are confident the program works may reduce the size of the log window output. For example, a simulation program repeated many times may generate 1000's of lines. Options to Interpret Macros in the Log File The SAS system options MPRINT, MTRACE, MLOGIC, MACROGEN, or SYMBOLGEN will help you during the development stage. These options show how macro variables resolve and how the macros have been executing. They include: OPTIONS mprint mtrace mlogic macrogen symbolgen ; You can turn them off by adding NO at beginning: OPTIONS NOmprint NOmtrace NOmlogic NOmacrogen NOsymbolgen ; The following list describes a few of the SAS system options that affect what is written to the log window: CPUID NOCPUID controls whether hardware information is written to the SAS log. ECHOAUTO NOECHOAUTO controls whether autoexec code in an input file is written to the log. ERRORS=n specifies the maximum number of observations for which data error messages are printed. For example, a message is delivered to the log file when SAS reads character data where it expects numercal data. The default value ERRORS=20, the maximum number of observations for which complete error messages are printed to the log file. MPRINT NOMPRINT controls whether SAS statements that are generated by macro execution are written to the SAS log. The MPRINT option should always be included when you test macros (see Chapter 9). MSGLEVEL= N | I controls the level of detail in messages that are written to the SAS log. If the MSGLEVEL system option is set to N, the log displays notes, warnings, and error messages only. If MSGLEVEL is set to I, the log displays additional notes pertaining to index usage, merge processing, and sort utilities, along with standard notes, warnings, and error messages. NOTES NONOTES specify whether notes (messages beginning with NOTE in the log window) are written to the SAS log. NoNotes does not suppress error or warning messages. Be SURE to turn Nonotes off when you're done with any program in which it is applied and be very sure that you don't have any bugs before turning it off. OVP NOOVP controls whether output lines that are printed by SAS are overprinted. PRINTMSGLIST NOPRINTMSGLIST controls whether extended lists of messages are written to the SAS log. SOURCE NOSOURCE controls whether SAS writes source statements to the SAS log. SOURCE2 NOSOURCE2 controls whether SAS writes secondary source statements from files entered into the program with %INCLUDE statements to the SAS log. May also be added as an option to an %INCLUDE statement which enters SAS statements or programs from external files: %INCLUDE "c:\sas\PrgrmA.sas" / source2; * show statements from this file; %INCLUDE "c:\sas\PrgrmA.sas" / NOsource2; * suppress statements from this file; SYMBOLGEN NOSYMBOLGEN controls whether the results of resolving macro variable references are written to the SAS log. For more information about when to enter these and other SAS system options, see "SAS System Options" in SAS Language Reference: Dictionary.