DOMARCB utility

The DOMARCB utility removes entries from the copy directory based on criteria that is specified in the program’s control statements, and then consolidates the remaining entries, allowing active records to be retained for a longer period of time.

You can use the following control statements with DOMARCB:

  • REMOVE SSID(xxxx) removes data or records associated with a specific Db2 subsystem.

  • REMOVE DAYS(nn) removes records older than the specified number of days.

  • REMOVE UNCATALOGED removes records for which the archive data set is not currently cataloged

  • REORGANIZE consolidates free records and sets the wrap pointer to the first one, ensuring that all free records will be used before the wrap function overwrites existing data.

    At the time of installation, the archive directory data set is created and preformatted with a fixed number of records. No new records can be added past that fixed number. When a record is deleted, it is not physically removed, but is left in the file for reuse. When the data set is full, the oldest records are overwritten first, even if they have not been marked for reuse.

    The REORGANIZE option consolidates all records marked as deleted so that they are overwritten first. Existing data is overwritten only after all deleted records are overwritten. The following figure illustrates this process.

    The #DOMARCB member of the BBSAMP data set contains sample JCL to invoke DOMARCB (see the following figure).

    //#DOMARCB   JOB (ACCT),'COPYDIR MAINT',      <== MODIFY
    //           MSGCLASS=X,                      <== CHECK
    //           CLASS=A                          <== CHECK
    //*
    //*
    //*Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z/Z
    //*
    //*   DOMARCB - THIS PROGRAM WILL PERFORM MAINTENANCE ON THE COPYDIR
    //*             FILE.  IT WILL ALLOW YOU TO REQUEST RECORDS BE DELETED
    //*             BASED ON VARIOUS CRITERIA.  ANY COMBINATION OF THESE
    //*             Control CARDS ARE ALLOWED IN ONE JOBSTEP EXECUTION.
    //*
    //*             THE FOLLOWING Control STATEMENTS ARE AVAILABLE:
    //*
    //*             REMOVE SSID(XXXX) --REMOVES DATA OR RECORDS
    //*                                 ASSOCIATED WITH THIS DB2 SYSTEM
    //*             REMOVE DAYS(NN) ----REMOVES RECORDS OLDER THAN XXX
    //*                                 DAYS.
    //*
    //*             REMOVE UNCATALOGED -REMOVES RECORDS WHOSE ARCHIVE
    //*                                 DATASET IS NOT CURRENTLY CATALOGED.
    //*             REORGANIZE ---------CONSOLIDATES THE FREE RECORDS AND
    //*                                 SETS THE WRAP POINTER TO THE FIRST
    //*                                 FREE ENTRY.  THIS ENSURES THAT ALL
    //*                                 THE FREE RECORDS WILL BE USED
    //*                                 BEFORE THE WRAP FUNCTION OVERWRITES
    //*                                 ANY EXISTING DATA.
    //*
    //*
    //*    DDNAME SYSPRINT WILL CONTAIN THE RESPONSES TO THOSE COMMANDS
    //*
    //**********************************************************************
    //*
    //DOMARCB  EXEC PGM=DOMARCB
    //STEPLIB  DD DISP=SHR,DSN=?BMC-HLQ?.BBLINK
    //SYSPRINT DD SYSOUT=*
    //SYSUDUMP DD SYSOUT=*
    //COPYDIR  DD DISP=SHR,DSN=?BMC-HLQ?.COPYDIR
    //SYSIN    DD  *
    REMOVE UNCATALOGED
    REMOVE DAYS(030)
    REMOVE SSID(XXXX)
    REORGANIZE
    //*-------------------- END OF: #DOMARCB ---------------------------

    The output from DOMARCB lists the number of records that were deleted, modified, or moved, depending on the options specified. The following figure contains sample output from all four options.

     Output from the REMOVE UNCATALOGED control statement:
    TOTAL RECORDS DELETED........................................41
    TOTAL RECORDS DELETED DUE TO UNCATALOGED DATASETS............41
    
    
      Output from the REMOVE SSID control statement:
    TOTAL RECORDS DELETED........................................37 
    TOTAL RECORDS MODIFIED RELATED TO 
      ssid.......................73 
    TOTAL RECORDS DELETED RELATED TO 
      ssid........................37
    
    
      Output from the REMOVE DAYS control statement:
    TOTAL RECORDS DELETED........................................210 
    TOTAL RECORDS DELETED DUE TO AGE.............................210
    
    
      Output from the REORGANIZE control statement: 
    TOTAL RECORDS DELETED........................................0 
    TOTAL RECORDS MOVED DUE TO REORGANIZATION....................217
    • nnnnnnnn is the number of records that were deleted, modified, or moved.

      Records are modified when a REMOVE SSID(ssid) is issued against a record that is associated with more than one Db2 subsystem. The specified Db2 subsystem is removed, but the record is retained.

    • ssid is the Db2 subsystem identifier.

Related topic

Was this page helpful? Yes No Submitting... Thank you

Comments