SUPPORT / SAMPLES & SAS NOTES
 

Support

Sample 33602: Displaying Additional SAS Log Messages with MSGLEVEL=

DetailsCodeAboutRate It
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.