Skip to content

Activity Log Housekeeping

This section describes housekeeping jobs that maintain the Activity Log file.

Back Up And Clear the Log File

Create a control statement, copy CMNLOG records to be retained, back up the entire CMNLOG VSAM file, create and initialize an empty CMNLOG file, populate the file with retained activity log records.

Note the commented out section at the start that provides sample code to notify users by email or TSOID, only relevant if you are running z/OS 2.3 or later, and JES2.

Sample JCL Member CLEARLOG
Programs and Utilities IRXJCL (REXX) with days retention parameter IDCAMS CMNVINIT
Suggested Frequency Weekly or as often as needed to:
● Maintain the efficiency of the online activity log
● Provide the desired amount of rolling activity data online
● Satisfy requirements of solutions that use activity log data such as the Dashboard
SERNET Status The SERNET instance where the VSAM file is used must be down.
Process Steps ● Builds a card deck into a temporary file CARDS via REXX using IRXJCL.
● Uses the CARDS file as SYSIN for an IDCAMS execution to backup required (aging) records to a temporary log file.
● Backs up existing log file via a REPRO to a QSAM file, then deletes and defines the permanent log file, and REPROs in a DUMMY RECORD using IDCAMS.
● Initializes the new log file using CMNVINIT.
● Finally restores the selected (aging) log records created by the IDCAMS step using the temporary log file created earlier, using IDCAMS.
Comments Specify the number of days that activity log data is retained for online display by setting the execution parameter for program IRXJCL in step AGECMD. See the sample JCL for details.
● Setting the IRXJCL execution parameter to 0 days turns off the aging function, and all activity log records are retained online.
● The backup file created in job step IDCAMS contains all records in the CMNLOG file at the time that the job was initiated. You must merge this backup with previous CMNLOG backups to create an activity log archive.