FDRARCH Examples


All examples in this section are found in the JCL library installed with FDR. The member names are EX5170x.

Format an Archive Control File example

Allocate an Archive Control File (ACF) and format it using the default of half-track blocking. On a 3390 (348/track), it needs 95 cylinders so it formats the entire primary allocation of 100 cylinders.

//FDRARCH EXEC PGM=FDRARCH,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //ARCHIVE DD DSN=FDRABR.ARCHIVE,DISP=(,CATLG), // UNIT=SYSALLDA,SPACE=(CYL,(100,10)) //SYSIN DD * FORMAT RECS=500000 /*

Format an Archive Control File with RLSE example

Allocate an Archive Control File and format it using quarter-track blocking. 300,000 records require 58 cylinders on a 3390. Since RLSE is specified, FDRARCH formats that many cylinders and releases the remainder.

//FDRARCH EXEC PGM=FDRARCH,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //ARCHIVE DD DSN=FDRABR.ARCHIVE,DISP=(,CATLG), // UNIT=SYSALLDA,SPACE=(CYL,300,RLSE) //SYSIN DD * FORMAT RECS=300000,B=4 /*

Backup an Archive Control File example

Create a backup copy of an Archive Control File named FDRABR.ARCHIVE.CONTROL on tape. This backup can only be restored by the RESTORE statement of FDRARCH.

//FDRARCH EXEC PGM=FDRARCH,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //ARCHIVE DD DSN=FDRABR.ARCHIVE.CONTROL,DISP=SHR //TAPE1 DD DSN=COPY.FDRABR.ARCHIVE,UNIT=TAPE,DISP=(,CATLG) //SYSIN DD * DUMP /*

Restore an Archive Control File example

Restore a backup copy of an Archive Control File from a tape created with the DUMP statement of FDRARCH. ENABLE=ERASE is required to allow the restore back on top of an existing control file.

//FDRARCH EXEC PGM=FDRARCH,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //ARCHIVE DD DSN=FDRABR.ARCHIVE.CONTROL,DISP=SHR //TAPE1 DD DSN=COPY.FDRABR.ARCHIVE,DISP=SHR //SYSIN DD * RESTORE ENABLE=ERASE /*

Tip

To restore a backup copy of an Archive Control File to a different name. specify the desired name on the //ARCHIVE DD statement along with DISP=(,CATLG) and a sufficient SPACE= to allocate the new file. Specify the name of the backup to be restored on the //TAPE1 DD statement. The name of the Archive Control File must have one qualifier of “.ARCHIVE” unless DISABLE=DSNCK is specified on the RESTORE statement.

Move or Expand an Archive Control File example

Restore a backup copy of an Archive Control File named from a tape created with the DUMP statement of FDRARCH. The output control file is a new file, which can be:

  • On a new volume,
  • On a new device type,
  • Larger than the original

allowing you to move and/or expand the Archive Control File. RESTORE formats the new file (using half-track blocking by default) and restores the records from the backup.

If this control file is to be used for ABR Auto-Recall, the name of the file must be in the ARCDSN parameter in the FDR Global Options. You must either update the option table, or name this new control file the same as the old one (renaming or deleting the old one first).

Tip

We recommend using FDRARCH rather than FDRDSF or FDRABR to move the Archive Control File to a different device type. FDRARCH automatically re-blocks the file for optimum efficiency.

//FDRARCH EXEC PGM=FDRARCH,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //ARCHIVE DD DSN=FDRABR.ARCHIVE,DISP=(,CATLG), // UNIT=SYSALLDA,SPACE=(CYL,200) //TAPE1 DD DSN=FDRABR.ARCBACK,DISP=OLD //SYSIN DD * RESTORE /*

Merge control files example

Merge three Archive Control Files into one control file. These files are indicated by the DD statement names ARCHM1, ARCHM2, and ARCHM3. The new archive file is created using the DD statement name ARCHIVE; the entire 100-cylinder allocation is formatted using default half-track blocking.

//MERGE EXEC PGM=FDRARCH,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //ARCHIVE DD DSN=FDRABR.ARCHIVE.NEW,DISP=(,CATLG), // UNIT=SYSALLDA,SPACE=(CYL,100) //ARCHM1 DD DSN=FDRABR.ARCHIVE.OLD1,DISP=OLD //ARCHM2 DD DSN=FDRABR.ARCHIVE.OLD2,DISP=OLD //ARCHM3 DD DSN=FDRABR.ARCHIVE.OLD3,DISP=OLD //SYSIN DD * MERGE MERGEDDNAMES=(ARCHM1,ARCHM2,ARCHM3) /*

Sort-Based reorganization example

Reorganize the common Archive Control File, using a SORT-based REORG for performance. The sequential backup of the control file is written to a DASD GDG; in case of problems, it can be restored to its previous condition with the RESTORE statement of FDRARCH.

  • ENABLE=DYNARC causes the Archive Control File named in the ARCDSN option of the FDR Global Options to be dynamically allocated.
  • ENABLE=IFNOTCAT causes any data set that was archived for Auto-Recall but which is no longer cataloged to be deleted. This includes old entries for data sets that were archived, were recalled, and were archived again; only the current entry is retained.
  • MAXOCCURRENCES=3 retains only the most recent three archived copies of a given data set; others are deleted.
  • The defaults of EXPIRE=PURGE, DELETE=PURGE, and RESTORE=IGNORE cause expired data sets and those marked for deletion by the DELETE statement of FDRARCH to be deleted during the reorganization. If you want to also delete data sets that have been restored by FDRABR, add these operands: EXPIRE=PURGE,DELETE=PURGE,RESTORE=PURGE
  • SORTALLOC=YES causes all files required for sorting to be dynamically allocated (if your SORT product has different needs, you may need to provide necessary DD statements).

Any deleted entries still cataloged for Auto-Recall are uncataloged and Archive Backup files that are no longer referenced after the REORG are deleted and uncataloged.

Tip

We recommend that the SORT-based REORG be used for most reorganizations.

//REORG EXEC PGM=FDRARCH,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //TAPE1 DD DSN=OPNS.ARCHIVE.BACKUP(+1),DISP=(,CATLG), // UNIT=SYSALLDA,SPACE=(CYL,(100,25),RLSE) //SYSIN DD * REORG SORT=YES,SORTALLOC=YES,ENABLE=(DYNARC,IFNOTCAT), MAXOCCURRENCES=3,DUMPDEVICE=DISK /*

Delete and reorganization example

Mark specified data sets for deletion from the Archive Control File, and then reorganize that file to actually perform the deletion. The DELETE statement first scans the entire control file, marking the data sets whose name matches the mask specified and which were archived more than 30 days ago. Then the REORG takes a sequential backup of the control file to a tape and reads it back to reload the Archive Control File, excluding the flagged records. Any deleted entries still cataloged for Auto-Recall are uncataloged and Archive Backup data sets that are no longer referenced after the REORG are deleted and uncataloged.

Important

The SORT-based reorganization shown in the previous example is recommended for most REORG operations since it is much more efficient when catalog accesses are required. The non-SORT REORG shown here can be used for small Archive Control Files (typically under 100,000 records) or when a limited number of records are affected as shown in this example.

//REORG EXEC PGM=FDRARCH,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //ARCHIVE DD DSN=FDRABR.ARCHIVE,DISP=SHR //TAPE1 DD DSN=TECH.REORG.ARCHIVE,DISP=(,CATLG),UNIT=CART //SYSIN DD * DELETE ADAYS>30,XDSN=TECH.*.LIST* REORG DELETE=PURGE /*

Simulate reorganization example

Simulate the reorganization of the production Archive Control File. This allows you to verify the correct operation of your parameters and to see the potential results. This uses the SORT-based REORG. Since the TEMPARCH DD statement is provided, the reorganized control file is written to that data set (that must be as large as the input control file); you can then run reports against it to verify correct operation.

//FDRARCH EXEC PGM=FDRARCH,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //ARCHIVE DD DISP=SHR,DSN=FDRABR.ARCHIVE //TEMPARCH DD DISP=(,CATLG,DELETE),DSN=GEORGE.ARCHIVE, // UNIT=SYSALLDA,SPACE=(CYL,50,RLSE) //SYSIN DD * REORG SIMULATE,SORT=YES,SORTALLOC=YES,ENABLE=IFNOTCAT, MAXGENERATION=6,MAXOCCURRENCES=1, DELETE=PURGE,EXPIRE=PURGE /*

Mark for deletion example

Mark for deletion all archive records created in January 2008 from TSO volumes, but reset the delete indicator for certain data sets. The result is that all records except those with a first index of SAVEDSN are deleted during the next reorganization. The UPDATE statement actually executes the DELETE and RESET statements in one pass of the control file. ENABLE=DYNARC causes the Archive Control File named in the FDR Global Options to be dynamically allocated for this operation.

//FDRARCH EXEC PGM=FDRARCH,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * DELETE ADATE.GE.2008001,ADATE.LE.2008031,VOL=TSO* RESET ADATE.GE.2008001,ADATE.LE.2008031,VOL=TSO*, DSG=SAVEDSN. UPDATE ENABLE=DYNARC /*

Extend expirations example

Extend by 30 days the expiration dates of all data sets that were archived in 2008. Also, set the expiration date of all data sets archived to DASD volume ARC003 to 14 days from today. For backups on tape, you may need to manually extend the expiration of the tapes involved through a tape management system utility. The UPDATE statement actually executes the MODIFY statements in one pass of the control file. ENABLE=DYNARC causes the Archive Control File named in the FDR Global Options to be dynamically allocated for this operation. LOG causes all modified data sets to be listed. Omit the REAL operands to perform the modification in simulation mode; REAL is required to actually modify the records.

//FDRARCH EXEC PGM=FDRARCH,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * MODIFY ADATE.GE.2008001,ADATE.LE.2008366,REAL, NEWEXPIRE=EXPIRE,DAYS+=30, MODIFY TAPEVOL=ARC003,NEWEXPIRE=TODAY,DAYS+=14,REAL UPDATE ENABLE=DYNARC,LOG /*

Correct Auto-Recall catalogs example

An IDCAMS “REPRO MERGECAT” operation has been used to move the system catalog entries for data sets beginning with “ABC” and “XYZ” to a new catalog; this operation zeros the DSCBTTR field in the catalog entry making auto-recall of those data sets impossible. The RECATALOG statement finds all entries in the Archive Control File for those names that are flagged for Auto-Recall, and corrects the DSCBTTR fields in the catalog to re-enable Auto-Recall for them.

//STEP1 EXEC PGM=FDRARCH,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //ARCHIVE DD DSN=FDRABR.ARCHIVE,DISP=SHR //SYSIN DD * RECATALOG XDSN=(ABC.**,XYZ.**),SERVICE=CORRECT /*

Maintain Auto-Recall catalogs example

This RECATALOG scans the entire Archive Control File and insures that the Auto-Recall entries in the system catalogs for all data sets flagged for Auto-Recall are correct. It creates catalog entries for any that are not currently cataloged and corrects any that have an improper or zero Auto-Recall pointer. The Auto-Recall pointer in the catalog points to the record in the control file where ABR is to start searching for a data set to be recalled; if the location of a given data set has moved more than 10 blocks due to REORG, the catalog pointer is updated to improve recall performance. Do not display the data sets that were re-cataloged (NOLOG).

//STEP1 EXEC PGM=FDRARCH,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * RECATALOG NOLOG UPDATE ENABLE=DYNARC,VARIATION=10 /*

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*