Implementing Hardcopy Activity Logs

A region can have more than one hardcopy activity log, of which only one is open for logging. Your region can be configured to log to disk, tape, or hard copy. From one to nine logs can be specified by including the required number of DD statements in the execution JCL. Logging can be specified to wrap when the last log is full or when the last log is swapped.
5-0
A region can have more than one hardcopy activity log, of which only one is open for logging. Your region can be configured to log to disk, tape, or hard copy. From one to nine logs can be specified by including the required number of DD statements in the execution JCL. Logging can be specified to wrap when the last log is full or when the last log is swapped.
To obtain the status of these logs, use the SHOW LOGS command.
When logging to disk, use the following DCB attributes: DSORG=PS,RECFM=VBA,LRECL=137,BLKSIZE=15476
Format of Logged Information
Each entry on the log has the following format:
12.04.23.12   SMITH     TERM54    +V NET,ACT,ID=NCP001
This entry consists of the following information:
  • A timestamp in the format 
    hh
    .
    mm
    .
    ss
    .
    hs
     (
    hh
     is the hour, 
    mm
     is the minute, 
    ss
     is the second, and 
    hs
     is 100th of a second)
  • The user ID that entered the command or logged the message
  • The terminal from which the command was entered or to which a message is sent
  • The text of the message or command
Commands are highlighted with a plus sign (+) prefixed to the text to make it easier to distinguish commands from messages when browsing the log. If the command entered is an unsolicited VTAM command, it is highlighted and prefixed with an equal sign (=).
Format of Logged Timer-initiated Commands
A timer-initiated command has a plus sign as the prefix, followed by the identity number of the timer command responsible. This identity number has the following format: #
nnnn
.
Example: Logged Timer-initiated Command
This example shows the log record of a timer-initiated command:
15.00.00.01   NETOPER   CNTL01    +#0005 D BFRUSE
Format of Logged Commands Executed in Background Environments
The following keywords in the user ID field for the command text and any resulting messages indicate execution under the control of background environments:
  • BG-SYS
    Background System Processor
  • BG-MON
    Background Monitor
  • BG-LOG
    Background Logger
Format of Logged Commands from NCL Procedure-dependent Environment
Some commands are executed from an NCL procedure-dependent environment (&INTCMD). For such a command, the node field on the log contains the NCL ID of the process issuing the command.
Format of Log After Time Change
A time change can cause the time to go backward. The activity log differentiates the records that overlap in time by adding a plus sign (+) after the time for the newer records. The feature is only available when you are viewing the log in the default or NORMAL format.
Format of the Hardcopy Log
The hardcopy log data set has the following format:
  • A heading on each page -- contains the day and date on which the log was created and the system identifier (NMID) of the originating region.
  • A log identifier on the right side of the page. The log identifier is the ddname under which the log was created. This log identifier assists log collation after printing.
  • 60 lines on each page -- this format can be altered to suit your requirements using the SYSPARMS LOGPAGE operand.\
  • For information about LOGPAGE, see Reference.
Swap the Hardcopy Log
Swapping the current log frees the log for immediate printing. Swapping the log is possible only when another unused log remains to which logging can continue. You can specify up to nine logs. Logs do not need to be consecutive.
To swap the log, enter the LOGSWAP command.
When a log is swapped, the log status, the requesting user ID, and the reason for the swap are recorded. You can display these details with the SHOW LOGS command.
Each of the logs is identified in the JCL member by the LOG
n
 ddname. 
n
 is in the range one to nine.
Example: Log Name
This example defines the LOG4 ddname:
//LOG4 DD SYSOUT=A,FREE=CLOSE
Mixing of device types is valid. Inclusion of FREE=CLOSE prints the log when the LOGSWAP command releases it.
Reuse of Hardcopy Log Data Sets
Wrapping lets you reuse a LOG data set when all of the available LOG data sets have been used.
The LOGWRAP SYSPARM determines whether log data set wrapping is allowed. You set the value of this SYSPARM in the Are Activity Logs to Wrap? field when you customize the LOGFILES parameter group in Customizer (
/PARMS
).
If you specify NO (the default) in the Are Activity Logs to Wrap? field, then wrapping is not permitted. When all the LOG data sets have been used due to successive LOGSWAP commands, the previous LOG data sets cannot be reused. After the last LOG data set is used, any further LOGSWAP commands are rejected.
If you specify YES in the Are Activity Logs to Wrap? field, log wrapping is allowed according to the following rules:
  • If you direct your LOG data sets to SYSOUT, the data set is unallocated as each LOG
    n
     DD statement is used because FREE=CLOSE. In this case, you can reissue an ALLOC command to reallocate another SYSOUT file under the same ddname. For example:
    ALLOC DD=LOG3 SYSOUT=A FREE=CLOSE
    This ddname is now available for use as another LOG data set. Any subsequent LOGSWAP operations can now reuse this LOG data set rather than rejecting the command when the last LOG data set is used.
  • If the LOG DD statements point to sequential data sets, log wrapping overwrites the earlier LOG data in these data sets. Before allowing the wrap to occur, archive the existing data.
Cross-Reference of Hardcopy Logs
To help operations staff to piece the full log together, certain information is recorded on the last and first lines of swapped LOG data sets.
The first line of a new log contains the reason for the swap, or the initiating user ID.
The last message that is printed on a swapped log is the ddname of the new log. Also printed at the start of the new log is the ddname or logical ID for the previous log.
I/O Errors on the Hardcopy Log
If an I/O error occurs on a log, the log is closed and the next available log is automatically swapped to and logging continues. This process also applies to data set full conditions when logging to disk.
If the I/O error occurs on the last available log, a warning message is sent to all monitor terminals informing them that logging has ceased. If logging is stopped, the STATUS command also includes a warning message. All log messages are passed to LOGPROC for analysis even if no log output is possible.
Write to the System Log
You can use the SYSPARMS SYSLOG operand to write all logged output or all VTAM PPO messages received to the system log.
To write all logged output to the system log also, enter the 
SYSPARMS SYSLOG=YES
 command.
To write all VTAM PPO messages to the system log also, enter the 
SYSPARMS SYSLOG=PPO
 command.
For more information about the SYSPARMS SYSLOG operand, see Reference.