Discarding archive log data sets
We can discard your archive log data sets and choose to discard the logs automatically or manually.
We must keep enough log data to be able to perform unit of work recovery, page set media recovery if a page set is lost, or CF structure media recovery if a CF structure is lost. Do not discard archive log data sets that might be required for recovery; if you discard these archive log data sets you might not be able to perform required recovery operations.
If we have confirmed that your archive log data sets can be discarded, we can do this in either of the following ways:
Automatic archive log data set deletion
We can use a DASD or tape management system to delete archive log data sets automatically. The retention period for IBM MQ archive log data sets is specified by the retention period field ARCRETN in the CSQ6ARVP installation macro (see the Use CSQ6ARVP for more information).
The default for the retention period specifies that archive logs are to be kept for 9999 days (the maximum). Important: We can change the retention period but we must ensure that we can accommodate the number of backup cycles that we have planned for. .IBM MQ uses the retention period value as the value for the JCL parameter RETPD when archive log data sets are created.
The retention period set by the MVS™/DFP storage management subsystem (SMS) can be overridden by this IBM MQ parameter. Typically, the retention period is set to the smaller value specified by either IBM MQ or SMS. The storage administrator and IBM MQ administrator must agree on a retention period value that is appropriate for IBM MQ.
Note: IBM MQ does not have an automated method to delete information about archive log data sets from the BSDS, because some tape management systems provide external manual overrides of retention periods. Therefore, information about an archive log data set can still be in the BSDS long after the data set retention period has expired and the data set has been scratched by the tape management system. Conversely, the maximum number of archive log data sets might have been exceeded and the data from the BSDS might have been dropped before the data set has reached its expiration date.If archive log data sets are deleted automatically, remember that the operation does not update the list of archive logs in the BSDS. We can update the BSDS with the change log inventory utility, as described in Change the BSDS. The update is not essential. Recording old archive logs wastes space in the BSDS, but does no other harm.
Manually deleting archive log data sets
We must keep all the log records as far back as the lowest RBA identified in messages CSQI024I and CSQI025I. This RBA is obtained using the DISPLAY USAGE command that we issued when creating a point of recovery using Method 1: Full backup.
Read Create a point of recovery for non-shared resources before discarding any logs.
- Locate and discard archive log data sets
-
Having established the minimum log RBA required for recovery, we can find archive log data sets that contain only earlier log records by performing the following procedure:
- Use the print log map utility to print the contents of the BSDS. For an example of the output, see The print log map utility.
- Find the sections of the output titled ARCHIVE LOG COPY n DATA SETS. If we use
dual logging, there are two sections. The columns labeled STARTRBA and ENDRBA show the range of RBAs
contained in each volume. Find the volumes with ranges that include the minimum RBA you found with
messages CSQI024I and CSQI025I. These are the earliest volumes we need to keep. If we are using
dual-logging, there are two such volumes. If no volumes have an appropriate range, one of the
following cases applies:
- The minimum RBA has not yet been archived, and we can discard all archive log volumes.
- The list of archive log volumes in the BSDS wrapped around when the number of volumes exceeded
the number allowed by the MAXARCH parameter of the CSQ6LOGP macro. If the BSDS does not register an
archive log volume, that volume cannot be used for recovery. Therefore, consider adding information
about existing volumes to the BSDS. For instructions, see Changes for archive logs.
Also consider increasing the value of MAXARCH. For information, see the Use CSQ6LOGP.
- Delete any archive log data set or volume with an ENDRBA value that is less than the STARTRBA
value of the earliest volume we want to keep. If we are using dual logging, delete both such
copies.
Because BSDS entries wrap around, the first few entries in the BSDS archive log section might be more recent than the entries at the end. Look at the combination of date and time and compare their ages. Do not assume that we can discard all entries before the entry for the archive log containing the minimum LOGRBA.
Delete the data sets. If the archives are on tape, erase the tapes. If they are on DASD, run a z/OS utility to delete each data set. Then, if you want the BSDS to list only existing archive volumes, use the change log inventory utility (CSQJU003) to delete entries for the discarded volumes. See Changes for archive logs for an example.
Parent topic: Manage the logs