Sample 33602: Displaying Additional SAS Log Messages with MSGLEVEL=
SAS users can have the SAS System automatically display additional information directly to the SAS log by specifying the MSGLEVEL= SAS System option in an Options statement. The MSGLEVEL= option supports two options: N (which is the default) and I. By specifying MSGLEVEL=I, SAS displays on the SAS Log helpful information pertinent to merge and sort processing; as well as index usage and suggestions on what can be done to influence SAS to use an index; along with the usual assortment of notes, warnings, and error messages.
To demonstrate the effect of using a MSGLEVEL=I option, the code on the "Full Code" tab illustrates a program that performs a simple SQL join on two tables, MOVIES and ACTORS. As can be seen in the resulting SAS Log, an informative message was automatically generated explaining that the SAS system chose to use an available index called Rating to optimize WHERE clause processing. This type of information is not only helpful in gaining a better understanding of what the SAS system did to improve processing, but provides the specific name of the index that was selected and used to achieve improved processing.
About the Author
Kirk Paul Lafler is the author of PROC SQL: Beyond the Basics Using SAS, published by SAS Press. He also writes the
popular SAS tips column "Kirk's Korner," which appears regularly in several SAS users group newsletters, and is a frequent speaker at
SAS users group meetings.
His book is available from the online bookstore.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
OPTIONS MSGLEVEL=I;
PROC SQL;
SELECT MOVIES.TITLE, RATING, LENGTH, ACTOR_LEADING
FROM MOVIES,
ACTORS
WHERE MOVIES.TITLE = ACTORS.TITLE AND
RATING = 'PG';
QUIT;
SAS Log Results
OPTIONS MSGLEVEL=I;
PROC SQL;
SELECT MOVIES.TITLE, RATING, LENGTH, ACTOR_LEADING
FROM MOVIES,
ACTORS
WHERE MOVIES.TITLE = ACTORS.TITLE AND
RATING = 'PG';
INFO: Index Rating selected for WHERE clause optimization.
QUIT;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
SAS users can have the SAS System automatically display additional information directly to the SAS log by specifying the MSGLEVEL= SAS System option in an Options statement.
Date Modified: | 2008-10-14 14:44:40 |
Date Created: | 2008-10-14 13:26:20 |
Operating System and Release Information
SAS System | Base SAS | z/OS | | |
OpenVMS VAX | | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | | |
Microsoft Windows XP 64-bit Edition | | |
Microsoft® Windows® for x64 | | |
OS/2 | | |
Microsoft Windows 95/98 | | |
Microsoft Windows 2000 Advanced Server | | |
Microsoft Windows 2000 Datacenter Server | | |
Microsoft Windows 2000 Server | | |
Microsoft Windows 2000 Professional | | |
Microsoft Windows NT Workstation | | |
Microsoft Windows Server 2003 Datacenter Edition | | |
Microsoft Windows Server 2003 Enterprise Edition | | |
Microsoft Windows Server 2003 Standard Edition | | |
Microsoft Windows XP Professional | | |
Windows Millennium Edition (Me) | | |
Windows Vista | | |
64-bit Enabled AIX | | |
64-bit Enabled HP-UX | | |
64-bit Enabled Solaris | | |
ABI+ for Intel Architecture | | |
AIX | | |
HP-UX | | |
HP-UX IPF | | |
IRIX | | |
Linux | | |
Linux for x64 | | |
Linux on Itanium | | |
OpenVMS Alpha | | |
OpenVMS on HP Integrity | | |
Solaris | | |
Solaris for x64 | | |
Tru64 UNIX | | |