Recataloging IAM Data Sets


There are three main reasons for recataloging IAM data sets. The first reason is to rebuild the catalog entry for the data set, if for some reason it has become uncataloged. The second reason is to update the associated data set names for data sets that are part of an IAM Alternate Index sphere, if one or more of the data sets has been renamed, or copied / restored to a new data set name. The third reason is to update certain file attributes. The recatalog process is invoked by specifying RECATALOG on the DEFINE CLUSTER, ALTERNATE INDEX, or PATH. Generally, only a subset of the operands is required for the recatalog process. The examples of each below will explain the required operands for each type of recatalog.

Success

Tip

If you only need to update the catalog entry, an IDCAMS DEFINE NONVSAM request can be used. In this case, if the data set is SMS managed, then the RECATALOG keyword must be specified, otherwise it should be left off.

Example A: Recatalog of an IAM Base Cluster Data Set

In the first recatalog example, an IAM base cluster data set is being recataloged. For this circumstance, specify the DEFINE CLUSTER command, with the following subparameters:

  • Name
  • OWNER($IAM), unless $IAM is in the data set name.
  • Volumes on which the data set resides,
  • And RECATALOG.

Recatalog an IAM Data set (EX1084A)

//RECATLOG EXEC PGM=IDCAMS
//SYSPRINT DD   SYSOUT=*
//IAMPRINT DD   SYSOUT=*
//SYSIN    DD   *
DEFINE CLUSTER(NAME(my.notcat.iam.dataset) -
OWNER($IAM) -
VOLUMES(iam001 iam002) -
RECATALOG)
LISTCAT ENT(my.notcat.iam.dataset) ALL
/*

Example B: Recatalog using Define NONVSAM

In this example, an SMS managed IAM data set is recataloged using a DEFINE NONVSAM. The following sub-parameters are used for this request:

  • NAME – identifies the data set name.
  • VOLUMES – identifies each volume that the data set resides on.
  • DEVT – for each volume in the above list, a device type must be specified.
  • OWNER($IAM) – The OWNER parameter is optional on the DEFINE NONVSAM, but is recommended so that the catalog entry will resemble the one that IAM builds.
  • RECATALOG – This keyword must be provided if the data set is SMS managed, otherwise it must not be specified.

Recatalog Using DEFINE NONVSAM (EX1084B)

//RECATSMS EXEC PGM=IDCAMS
//SYSPRINT DD   SYSOUT=*
//IAMPRINT DD   SYSOUT=*
//SYSIN    DD   *
DEFINE NONVSAM(NAME(my.notcat.iam.dataset) -
OWNER($IAM) -
VOLUMES(iam001 iam002) -
DEVT(3390 3390) -
RECATALOG)
LISTCAT ENT(my.notcat.iam.dataset) ALL
/*

Example C: Recatalog an IAM Alternate Index

In this example, an IAM Alternate Index is being recataloged. The operation is quite similar to the recatalog of a base cluster, but with a few differences in the operands. The related base cluster must be specified, and the OWNER($IAM) operand is completely optional. When recataloging an Alternate Index, the association with the base cluster information is also updated both in the IAM Alternate Index data set, and also in the IAM base cluster. The following operands are used:

  • NAME – Indicates the name of the IAM Alternate Index.
  • RELATE – Indicates the name of the base cluster. If the base cluster has been renamed, use the new name here. The base cluster must be cataloged prior to recataloging the alternate index.
  • VOLUMES – Identifies the volumes on which the alternate index resides. If the volumes are not known and the data set is actually cataloged, the characters ANYVOL can be specified as the volume parameter.
  • RECATALOG – Indicates that the data set already exists, and that the catalog entry is just being rebuilt, along with updating the base cluster association information.

Example of Recataloging an IAM Alternate Index (EX1084C)

//RECATAIX EXEC PGM=IDCAMS
//SYSPRINT DD   SYSOUT=*
//SYSIN    DD   *
DEFINE ALTERNATEINDEX -
(NAME(example.testiam.aix) -
RELATE(example.testiam.cluster) -
VOLUME(ANYVOL)  -
RECATALOG )
LISTCAT ENT(RAM2.TESTIAM.AIX)     ALL
/*

Example D: Recataloging an IAM Path

Because an IAM PATH is an actual data set than just a catalog entry, the recatalog of an IAMPATH does have a special consideration; in that the PATH must be cataloged for the RECATALOG to work. This is because IDCAMS provides no mechanism to pass a volume on the DEFINE PATH command. So, if the PATH is not cataloged, it must be preceded by a DEFINE NONVSAM of the PATH, followed by the DEFINE RECATALOG. In this case, the need for the RECATALOG is to update the association information in the path itself, and the path entry data set. The example below demonstrates how this is done. First, a LISTCAT is done on the path to see if it is cataloged. If it is not cataloged, then a DEFINE NONVSAM is issued to catalog the path. Then the DEFINE PATH RECATALOG is done.

Example of Recatalog an IAM Path (EX1084D)

//RECATPTH EXEC PGM=IDCAMS
//SYSPRINT DD   SYSOUT=*
//SYSIN    DD   *
 LISTC ENT(RAM2.TESTIAM.PATH)
 IF LASTCC NE 0 THEN DO
   SET   MAXCC=0
   DEFINE NONVSAM-
          (NAME(RAM2.TESTIAM.PATH) -
           VOLUMES(JUNK01) -
           DEVT(3390) -
           OWNER($IAM))
   END
   ELSE
 DEFINE PATH -
      (NAME(RAM2.TESTIAM.PATH) -
      PATHENTRY(RAM2.TESTIAM.AIX) -
      RECATALOG )
 LISTCAT ENT(RAM2.TESTIAM.PATH)    ALL
/*

Example E: Altering the File Attributes

IAM itself does not do any processing for the ALTER command, however, various file attributes can now be changed through the DEFINE RECATALOG process. When executed with the use of the IAMCREATE override statement certain attributes can be revised including buffer space, minimum and maximum buffer specifications for a data set, journaling options, the share options, and the RLSID. With Version 9.3 and above the values for LOGREPLICATE, LOGSTREAM and FRLOG can also be changed. The example below, the RLSID is nullified, and the share options are changed to 2. By specification of a volume of ANYVOL, the actual volumes on which the data set resides does not need to be known.

Altering an IAM File's Attributes (EX1084E)

//*
//*
//*  EXAMPLE OF REMOVING RLSID AND CHANGING SHAREOPTION
//*
//*
//EX1084E EXEC PGM=IDCAMS
//IAMPRINT  DD  SYSOUT=*
//SYSPRINT  DD  SYSOUT=*
//IAMOVRID  DD  *
CREATE DD=&ALLDD,RLSID=,SHARE=2
/*
//SYSIN     DD  *
  DEFINE CLUSTER -
         (NAME(IAMV.EX1084E.CLUSTER) -
         VOL(ANYVOL) -
         OWNER($IAM ) -
         RECATALOG)
  LISTC  ENTRIES(IAMV.EX1084E.CLUSTER) ALL
/*


 

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

BMC AMI Storage IAM 11.0