B97DEARC: Archive cleanup batch utility

Overview

The archive cleanup batch utility (B97DEARC) deletes archived lists and indexes from the archive after their archive retention period has expired.

Note

The archive cleanup batch utility removes entries from the Adabas Audit Data Retrieval database, but does not actually delete any archive datasets.

The output printed to DD IRMDEL can be used as input for IDCAMS (DD SYSIN) to delete the datasets that no longer contain any valid archive data.

Running B97DEARC

You should run this utility on a daily basis to ensure that expired data is deleted from the archive.

Tailored JCL for this job can be found in member B97DEARC in the BETA97.CNTL and in the corresponding step of the B97DAILY job.

You can also submit this batch utility online using option S.3.4. This will generate JCL from member SE97ACLN of the BETA97.ISPSLIB (skeleton library).

JCL

+--------------------------------------------------------------------+
|jobcard |
|//B97DEARC EXEC PGM=BST01RFF,REGION=0M,PARM=('S=97', |
|// 'PGM=B97DEARC', |
|// 'B01LST=xx', |
|// 'B97LST=xx', |
|// 'SIGNON=YES') |
|//* |
|//STEPLIB DD DISP=SHR,DSN=BETA97.LOAD |
|// DD DISP=SHR,DSN=BSA.LOAD |
|//* |
|//SFFPARM DD DISP=SHR,DSN=BETA.PARMLIB |
|//B97DEF DD DISP=SHR,DSN=BETA97.DB.DEF |
|//* |
|//SYSPRINT DD DUMMY |
|//IRMLOG DD SYSOUT=* |
|//IRMPRINT DD SYSOUT=* |
|//IRMDEL DD SYSOUT=* |
|//IRMERROR DD SYSOUT=* |
|//* |
|//SFFFDUMP DD SYSOUT=* |
|//SYSABEND DD SYSOUT=* |
|//* |
+--------------------------------------------------------------------+

Return codes

0

The program terminated normally.

4

This return code can occur due to several reasons:

  • The program did not find any data to be removed;
    the program terminated normally.
  • Lists/Reports have been marked for reducing the archive retention period, but the reduction has not been executed.

>4

One or several errors occurred during processing.
Please check the job log DD IRMPRINT for details.

Some return codes are program-specific. Others are standard return codes which can also be modified. More information on standard return codes can be found in "Return codes".

IRMLOG

A processing log is written to DD IRMLOG. It contains the following information:

  • Total number of lists whose retention period has expired

    The archive batch utility checks all archive datasets containing these lists and all volumes containing these archive datasets. The following information is displayed:

    • Number of archive datasets whose records are deleted from the Adabas Audit Data Retrieval database because all data in these datasets have reached their retention period
    • Number of archive datasets containing data that is still active
    • Number of volumes containing archive datasets that are still active

+-----------------------------------------------------------------------------------------------+
|IRM1561I PROGRAM: B97DEARC VERSION: V7R2M00 PTFLVL: ptflvl COMPILED: date, time |
|IRM2100I ARCHIVE CLEANUP PROCESSING STARTED - DATE: 12.03.2020, TIME: 09:49:47 |
|IRM2130I ************************************************************************************* |
|IRM2130I 0001234 LIST(S) FOR DELETE SELECTED |
|IRM2130I 0000000 REPORT(S) FOR DELETE SELECTED |
|IRM2130I 0000023 DATASET(S) FOR DELETE SELECTED |
|IRM2130I 0000790 DATASET(S) IN USE SELECTED |
|IRM2130I 0000027 VOLUME(S) IN USE SELECTED |
|IRM2130I ************************************************************************************* |
|IRM2199I ARCHIVE CLEANUP PROCESSING ENDED - DATE: 12.03.2020, TIME: 09:49:54, RC: 0000 |
+-----------------------------------------------------------------------------------------------+

IRMPRINT

DD IRMPRINT itemizes the lists deleted from the archive. The log contains the following:

  • DATE / TIME: Creation date and time of the list/report
  • FORM / EXTENSION / REPORT: Name of the list
  • PAGES: Number of pages of the list/report
  • RETPD: Retention period of the list in days

Note: The LST parameter B97_DEARC_SORT = NO can be used to turn off sorting, which reduces the run time of the archive cleanup job (default is YES).

+-----------------------------------------------------------------------------------------------+
|Date: 13.03.2020 Product: Beta 97 ARCHIVE CLEANUP UTILITY Page: 1 |
|Time: 08:34:55 Version: V7R2 DELETED LISTS/REPORTS |
| |
| |
|Date Time Form Extension Report Pages Retpd Reason |
|---------- -------- -------- ---------------- ---------------- -------- ------ ------ |
|11.03.2020 11:18:43 TC9750 ONLRET1 00001811 000001 0000 |
|11.03.2020 11:18:58 TC3693 ONLRET1 00001811 000002 0000 |
|11.03.2020 13:29:06 TC3801 RECHNUNGEN 00001811 000001 0000 |
|11.03.2020 13:29:19 TC3801 RECHNUNGENBWE 00001811 000001 0000 |
|11.03.2020 17:19:36 TC3844 RECHNUNGEN 00001811 000001 0000 |
|11.03.2020 17:42:49 TC3844 RECHNUNGEN 00001811 000001 0000 |
|11.03.2020 17:43:02 TC3844 RECHNUNGEN 00001811 000001 0000 |
|11.03.2020 17:44:16 REJ BALDESCOMPTES 00000005 000001 0000 |
|11.03.2020 17:44:17 REJ BALDESCOMPTES 00000005 000001 0000 |
+-----------------------------------------------------------------------------------------------+

Logs when NEWEXPDT in IGR

If the archive expiration date of one or several affected lists has been marked for modification (new archive expiration date NEWEXPDT in IGR), then B97DEARC terminates without deleting data from the Adabas Audit Data Retrieval database. To enable the archive cleanup batch utility (B97DEARC) to delete data, you must first run the batch utility B97AXPDT, which increases the archive expiration date of the archive datasets affected in the Adabas Audit Data Retrieval database.

In this case DD IRMLOG contains the following message:

+--------------------------------------------------------------------------------------------------+
|IRM1561I PROGRAM: B97DEARC VERSION: V7R2M00 PTFLVL: ptflvl COMPILED: date, time |
|IRM2100I ARCHIVE CLEANUP PROCESSING STARTED - DATE: 16.03.2020, TIME: 08:30:40 |
|IRM2130I ************************************************************************************* |
|IRM2140E MODIFICATION REQUEST(S) FOUND FOR ARCHIVE EXPIRATION DATE (NEWEXPDT), PROCESSING ABORTED |
|IRM2130I ************************************************************************************* |
|IRM2199I ARCHIVE CLEANUP PROCESSING ENDED - DATE: 16.03.2020, TIME: 08:30:40, RC: 0008 |
+--------------------------------------------------------------------------------------------------+

In DD IRMPRINT, B97DEARC itemizes all lists whose archive expiration date has been marked for modification. This report contains the following information:

  • DATE / TIME: Date and time of the list
  • FORM / EXTENSION / REPORT: Name of the list
  • AEXPDT: Original archive expiration date
  • NEWEXPDT: New archive expiration date

+---------------------------------------------------------------------------------------+
| Date: 09.03.2020 Product: Beta 97 ARCHIVE CLEANUP UTILITY Page: 00001 |
| Time: 11:39:12 Version: V7R2 LISTS/REPORTS WITH NEWEXPDT SET |
| |
| Date Time Form Extension Report Aexpdt Newexpdt |
| ---------- -------- -------- ---------------- ---------------- ---------- ---------- |
| 29.08.2015 10:17:09 REJ TRADE 30.08.2020 30.08.2022 |
| 30.08.2015 10:17:09 REJ TRADE 31.08.2020 31.08.2022 |
| 31.08.2015 10:17:09 REJ TRADE 01.09.2020 01.09.2022 |
| ... |
+---------------------------------------------------------------------------------------+

IRMDEL

DD IRMDEL lists the datasets whose records have been removed from the Adabas Audit Data Retrieval database because all data archived in these datasets has expired.

The output printed to DD IRMDEL can be used as input for IDCAMS (DD SYSIN) to actually delete the datasets in question.

+---------------------------------------------------------------------------+
| DELETE BETA97.DISK3.ARCH01.E09123.C001 |
| DELETE BETA97.DISK3.ARCH01.E09123.C002 |
| DELETE BETA97.DISK3.ARCH01.E09123.C003 |
| DELETE BETA97.DASD.ARCH00.E09123.C001 |
| ... |
+---------------------------------------------------------------------------+

IRMERROR

The report that is written to DD IRMERROR shows the following:

  • All lists/reports that have been marked for extending the archive retention period
  • All lists/reports that have been marked for reducing the archive retention period, but where the reduction has not yet been executed