Reference: Log data archiving: Configure the Command and Audit Log Archive (ATYARCH0) utility
IMS Administration Tool provides the Command and Audit Log Archive (ATYARCH0) utility that copies old log data to a DSORG=PS data set, and simultaneously marks it eligible for deletion. The ATYARCH0 utility supports both command log data and audit log data. You can select the log records to archive; command log records, audit log records, or both.
The ATYARCH0 utility provides several options for determining what log records are considered old, and therefore subject to archiving/deletion. Most of the archiving options archive only log records that were written prior to the current date. Use the MAX control card if you must archive log records from the current date.
If the log data needs to be kept for historical purposes, the retention period must be high enough so that the z/OS® System Logger will not delete the log data before it is off-loaded by the ATYARCH0 utility.
The output log data is displayed in the same format as the log of View Audit Log. To check the format, use either the IMS Administration Tool web interface or the ISPF interface: .
- The ATYARCH0 utility supports command log records written by IMS Command Control Facility.
- A CCF log record (log record generated by IMS Command Control Facility) is identified by its first character "c" in the archived data set. A command log record of IMS Administration Tool is identified by its first character "C".
- The View Audit Log function and the View IMS Command Log function of IMS Administration Tool do not support CCF log records. You can view CCF log records only in the archived data set.
- The IMS Command Control Facility archive utility does not support log records that are written by IMS Administration Tool. If log records of both products are stored in the same log stream, use the ATYARCH0 utility.
ATYARCH0 JCL
Sample JCL for archiving log data can be found in the SATYSAMP sample library, member ATYARCH0.
EXEC statement
Specify PGM=ATYARCH0 for the EXEC statement.
DD statements
- STEPLIB DD
- Specify the IMS Administration Tool product load library.
- LOGOUT DD
- Describes the output data set where the command and log data is written.
The data set is defined as
LRECL=1024
andRECFM=VB
.The size of the data set is determined by the amount of data that is being archived.
- SYSPRINT DD
- An output data set that provides informational messages about the utility.
SYSPRINT is defined as
LRECL=80
andRECFM=FB
.The output can be written to SYSOUT or a data set.
- SYSIN DD
- An input data set that contains control statements that specify archiving parameters.
SYSIN is defined as
LRECL=80
andRECFM=FB
.
SYSIN control statements
The SYSIN data set contains your description of the processing to be done by the ATYARCH0 utility.
- Keywords and keyword values must be coded within column 1 and column 71. Keywords must start on column 1 or 2.
- The column 72 must be blank.
- A keyword and its value must be joined with an equal sign (=) and they must be coded on the same line.
- More than one keyword can be coded on one line. Keywords must be separated by blank space.
- Keywords are not positional parameters; they can be specified in any order.
- A comment line must begin with an asterisk (*) in column 1.
- Blank lines are ignored.
- Table 1 summarizes required control statements.
- Table 2 summarizes control statements for narrowing down the records by time range and the number of records. Records identified by these control statements will be marked as eligible for deletion.
- Table 3 summarizes control statements for selecting the type of log records to copy to the archive data set. Among the log records that are marked as eligible for deletion, only the type of log records selected by these control statement are copied to the archive data set.
Definition | Value |
---|---|
LSN=name |
Required. Specify the 1- to 26-byte log stream name. |
Definition | Value |
---|---|
DATE |
Default. The utility starts processing from the oldest record and continues until it encounters a log record with a different date. |
HOURS=nn |
The utility starts processing from the oldest record and continues until nn number of hours of log records has been archived, or a log record with the current date is encountered. Valid values for nn are 1-24. When the HOURS definition is specified in conjunction with DATE, the processing continues until nn hours of records have been processed, or a log record with a date change has been encountered. |
RECS=nnnnnn |
The utility starts processing from the oldest record and continues until nnnnnn records have been processed. Valid values for nnnnnn are 1-999999. This control statement is not valid with any other control statements listed in this table. |
ALL |
The utility starts processing from the oldest record and continues until a log record with the current date minus one day has been encountered. For example, if the utility is run at 2022/10/20 15:32, any log record created on and before 2022/10/19 are processed. This control statement is not valid with any other control statements listed in this table. |
MAX |
The utility starts processing from the oldest record and continues until a log record with the current hour minus one hour has been encountered. For example, if the utility is run at 2022/10/20 15:32, any log record created at and before 2022/10/20 14:59 are processed. If using this option, it is recommended that the archive job (ATYARCH0) be scheduled at 15 minutes past the hour. This ensures at least 15 minutes of log data is always present in the log stream. This control statement is not valid with any other control statements listed in this table. |
Definition | Value |
---|---|
FILTER=[A | C | X] |
Optional. Specify the type of log records to copy to the archive data set.
|
CCFLOG=[Y | N] |
Optional. Specify whether to copy CCF log records to the archive data set.
|
SYSIN control statement examples
//SYSIN DD *
LSN=Logger data set name
FILTER=X
ALL
/*
- The first line is a comment line because the first column has an asterisk.
- The second line has keyword LSN starting from the second column. This is valid because keywords must start in column 1 or 2.
- The third line is a blank line. The utility skips this line.
- The forth line has multiple keywords in one line.
//SYSIN DD *
* Comment line
LSN=Logger data set name
FILTER=C MAX
/*