Previous Page | Next Page

System Options under z/OS

LOGPARM= System Option: z/OS



Controls when SAS log files are opened, closed, and, in conjunction with the LOG= system option, how they are named.
Valid in: configuration file, SAS invocation
Category: Log and procedure output control: SAS log
PROC OPTIONS GROUP= LOGCONTROL
z/OS specifics: restrictions on the OPEN argument and the length of log filename
See: LOGPARM= System Option in SAS Language Reference: Dictionary

Syntax
Syntax Description
Details
Examples
See Also

Syntax

LOGPARM=
"<OPEN= APPEND | REPLACE | REPLACEOLD>
<ROLLOVER= AUTO | NONE | SESSION | n | nK | nM | nG>
<WRITE= BUFFERED | IMMEDIATE>"


Syntax Description

OPEN=

when a log file already exists, controls how the contents of the existing file are treated.

APPEND

appends the log when opening an existing file. If the file does not already exist, a new file is created. This option cannot be used if the LOG= system option specifies a member of a PDS or PDSE.

REPLACE

overwrites the current contents when opening an existing file. If the file does not already exist, a new file is created.

REPLACEOLD

appends the log when opening an existing file. If the file does not already exist, a new file is created. This option can be used if the LOG= system option specifies a UFS file, but it cannot be used if a member of a PDS or PDSE is specified.

Default: REPLACE
ROLLOVER=AUTO|NONE|SESSION|n|nK|nM|nG

controls when or if the SAS log rolls over (that is, when the current log is closed and a new one is opened).

Note:   If you use ROLLOVER=n to roll over your files, the OPEN= parameter is ignored, and the initial log file is opened with OPEN=APPEND.  [cautionend]

AUTO

causes an automatic rollover of the log when the directives in the value of the LOG= option change (that is the current log is closed and a new log file is opened).

Interaction: The name of the new log file is determined by the value of the LOG= system option. However, if LOG= does not contain a directive, the name would never change, so the log would never roll over even when the ROLLOVER=AUTO value is used.
NONE

specifies that rollover does not occur, even when a change occurs in the name that is specified with the LOG= option.

Interaction: If the LOG= value contains any directives, they do not resolve. For example, if Log="#b.log" is specified, the directive "#" does not resolve, and the name of the log file remains "#b.log".
SESSION

at the beginning of each SAS session, opens the log file, resolves directives that are specified in the LOG= system option, and uses its resolved value to name the new log file. During the course of the session, no rollover is performed.

n|nK|nM|nG

causes the log to roll over when the log reaches a specific size, stated in multiples of 1 (bytes); 1,024 (kilobytes); 1,048,576 (megabytes); or 1,073,741,824 (gigabytes). When the log reaches the specified size, it is closed and renamed by appending "old" to the log filename, and if it exists, the lock file for a server log. For example, a filename of 2008Dec01.log is renamed 2008Dec01old.log. A new log file is opened using the name specified in the LOG= option.

CAUTION:
Old log files can be overwritten.

SAS maintains only one old log file with the same name as the open log file. If rollover occurs more than once, the old log file is overwritten.  [cautionend]

Restriction: The minimum log file size is 10K.
See also: Log Filenames in the SAS Language Reference: Concepts.
Default: NONE
Interaction: Rollover is triggered by a change in the value of the LOG= option.
Restriction: Rollover does not occur more often than once a minute.
See Also: LOG= system option
WRITE=

specifies when content is written to the SAS log.

BUFFERED

writes content to the SAS log only when a buffer is full in order to increase efficiency.

IMMEDIATE

writes to the SAS log each time that statements are submitted that produce content for the SAS log.

Default: BUFFERED

Details

The LOGPARM= system option controls the opening and closing of SAS log files. 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=. If you issue the LOG= system option, then LOG= must specify a physical name.

Native z/OS filenames that contain more than eight characters are truncated to eight characters. The character count begins with the first character of the filename. If a period is encountered, the character count begins again. For example,

testFeb1234.Wednesday

is truncated to the following

testFeb1.Wednesda

Note that testFeb1234 is truncated to testFeb1, and that Wednesday is truncated to Wednesda.

If a directive is specified in a PDS member name, the directive is fully expanded. The PDS member name might then exceed eight-characters, which is the maximum length for a PDS member name, and an error will occur.

Directives are fully expanded for the UNIX file system.

Using directives in the value of the LOG= system option enables 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, and so on. The following table contains a list of directives that are valid in LOG= values:

The z/OS directives begin with #. Specifying a % directive instead of a # directive is not supported on z/OS.

Directives for Controlling the Name of SAS Log Files
Directive Description Range
#a Locale's abbreviated day of week Sun-Sat
#A Locale's full day of week Sunday-Saturday
#b Local's abbreviated month Jan-Dec
#B Locale's full month January-December
#C Century number 00-99
#d Day of the month 01-31
#H Hour 00-23
#j Julian day 001-366
#l * User ID Identifies a user to the system. The user ID consists of 1 through 8 alphanumeric or national ($, #, @) characters. The first character must be an alphabetic character or a national character ($, #, @).
#M Minutes 00-59
#m Month number 01-12
#n Current system nodename (without domain name) none
#p * Process ID Returns your user ID in TSO, the name on the JOB card in the JCL, or the start command or proc name for a started task (STC).
#s Seconds 00-59
#u Day of week 1= Monday-7=Sunday
#v * Unique identifier alphanumeric expression that creates a log filename that does not currently exist
#w Day of week 0=Sunday-6=Saturday
#W Week number (Monday as first day; all days in new year preceding first Monday are in week 00) 00-53
#y Year without century 00-99
#Y Full year 1970-9999
## Pound escape writes a single pound sign in the log filename. #
* Because %v, %l, and %p are not a time-based format, the log filename never changes after it has been generated. Therefore, the log never rolls over. In these situations,specifying ROLLOVER=AUTO is equivalent to specifying ROLLOVER=SESSION.


Examples


See Also

Previous Page | Next Page | Top of Page