Usage Note 10110: Documentation and examples of using the LOGPARM= system option
SAS Logs can become huge for SAS/SHARE servers. The LOGPARM= option in
conjunction with the LOG= option can be helpful in managing distribution
of this information to multiple output data sets.
This information was extracted from the SAS 9 online documentation:
LOGPARM= "<OPEN= APPEND | REPLACE | REPLACEDOLD> <ROLLOVER= AUTO | NONE
| SESSION> <WRITE=BUFFERED | IMMEDIATE>"
controls when SAS log files are opened and closed. This option also
controls the naming of new log files, in conjunction with the LOG=
system option and the use of directives in the value of LOG=. The
LOGPARM= system option replaces the UNBUFLOG system option that was used
in previous versions.
Using directives in the value of the LOG= system option allows you to
control when logs are open and closed and how they are named, based on
real time events, such as time, month, day of week, etc. For more
detailed information about the LOGPARM= system option and a table with a
list of directives that are valid in LOG= values, see the LOGPARM=
system option in SAS Language Reference: Dictionary.
Here are some examples:
Operating Environment Information: The LOGPARM= system option is
executed when SAS is invoked. When you invoke SAS at your site, the form
of the syntax is specific to your operating environment. See the SAS
documentation for your operating environment for details.
The following example was adapted for the mainframe and an example is
located in #009672 :
Rolling over the log at a certain time and using directives to name the
log according to the time: If this command is submitted at 9:43 AM, this
example creates a log file called test0943.log, and the log rolls over
each time the log filename changes. In this example, at 9:44 AM, the
test0943.log file will be closed, and the test0944.log file will be
opened:
sas -log "test%H%M.log" -logparm "rollover=auto"
Preventing log rollover but using directives to name the log: For a SAS
session that begins at 9:34 AM, this example creates a log file named
test0934.log, and prevents the log file from rolling over:
sas -log "test%H%M.log" -logparm "rollover=session"
Preventing log rollover and preventing the resolution of directives:
This example creates a log file named test%H%M.log, ignores the
directives, and prevents the log file from rolling over during the
session:
sas -log "test%H%M.log" -logparm "rollover=none"
Creating log files with unique identifiers: This example uses a unique
identifier to create a log file with a unique name:
sas -log "test%v.log" -logparm "rollover=session "
SAS creates a log file called test1.log, if test1.log does not already
exist. If test1.log does exist, SAS continues to create filenames in
this format--test2.log and so on--until it generates a log filename that
does not exist.
Because %v is not a time-based format, the log file name will never
change after it has been generated; therefore, the log will never roll
over. In this situation, specifying ROLLOVER=SESSION is equivalent to
specifying ROLLOVER=AUTO.
Operating System and Release Information
SAS System | SAS/SHARE | Microsoft Windows XP Professional | 9 TS M0 | |
Microsoft Windows NT Workstation | 9 TS M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9 TS M0 | |
Microsoft Windows 2000 Server | 9 TS M0 | |
Microsoft Windows 2000 Datacenter Server | 9 TS M0 | |
Microsoft Windows 2000 Professional | 9 TS M0 | |
z/OS | 9 TS M0 | |
64-bit Enabled Solaris | 9 TS M0 | |
Solaris | 9 TS M0 | |
Microsoft Windows 2000 Advanced Server | 9 TS M0 | |
64-bit Enabled HP-UX | 9 TS M0 | |
HP-UX IPF | 9 TS M0 | |
HP-UX | 9 TS M0 | |
Linux | 9 TS M0 | |
OpenVMS Alpha | 9 TS M0 | |
64-bit Enabled AIX | 9 TS M0 | |
Tru64 UNIX | 9 TS M0 | |
AIX | 9 TS M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Usage Note |
Priority: | |
Topic: | Internal Administration ==> Documentation
|
Date Modified: | 2003-05-23 19:44:11 |
Date Created: | 2003-05-23 19:44:11 |