Logger and Appender Object Language Reference |
SAS provides two predefined component objects that you can use in a DATA step to access SAS logging: the appender object and the logger object. These objects enable you to record log events and write these events to the appropriate destinations. For more information about SAS logging, see The SAS Log in SAS Language Reference: Concepts and The SAS Logging Facility.
The DATA step Component Interface enables you to create and manipulate the logger and appender objects by using statements, attributes, and methods. You use the DECLARE statement to declare and create a component object. You use DATA step object dot notation to access the component object's attributes and methods. Attributes are the properties that specify the information that is associated with an object. Methods define the operations that an object can perform.
An appender and logger object need to be created only one time for each DATA step. Because the DATA step uses the implicit loop to process observations in a data set, you can use the automatic variable _N_ in an IF statement to process the appender and logger object code during the first DATA step iteration.
Note: The DATA step component object statements, attributes, and methods are limited to those defined for these objects. You cannot use SAS Component Language functionality with these predefined DATA step objects.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.