z/OS DFSMS Access Method Services Commands
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Import a Catalog: Example 2

z/OS DFSMS Access Method Services Commands
SC23-6846-01

In this example, a catalog, USERCAT4, that was previously exported, is imported. (See the EXPORT example, Export a Catalog: Example 1.) The original copy of USERCAT4 is replaced with the imported copy, from the portable file copy in CATBACK. Access method services finds and deletes the duplicate name, USERCAT4. Any aliases in the master catalog for USERCAT4 are preserved. (A duplicate name exists because the catalog was exported with the TEMPORARY attribute.) Access method services then redefines USERCAT4, using the catalog information from the portable file, CATBACK. USERCAT4 is locked to prevent access to anyone except authorized recovery personnel.

Requirement: Before you can lock a catalog, you must have read authority to the profile name, IGG.CATLOCK, with class type FACILITY.

//IMPRTCAT JOB   ...
//STEP1    EXEC  PGM=IDCAMS
//SOURCE   DD    DSNAME=CATBACK,UNIT=3390,
//   VOL=SER=327409,DISP=OLD
//SYSPRINT DD    SYSOUT=A
//SYSIN    DD    *
     IMPORT -
           INFILE(SOURCE) -
           OUTDATASET(USERCAT4) -
           ALIAS -
           LOCK -
           CATALOG(ICFMAST1)
/*
Job control language statement:
  • SOURCE DD describes the portable data set, CATBACK.
The IMPORT command copies the portable data set, CATBACK, into the system. Access method services reorganizes the data records so that deleted records are removed and control intervals and control areas contain the specified free space percentages. The original copy of the cluster is deleted and replaced with the data records from the CATBACK portable file. The IMPORT command's parameters are:
  • INFILE points to the SOURCE DD statement.
  • OUTDATASET gives the name of the catalog being imported. Access method services dynamically allocates the catalog.
  • ALIAS specifies that aliases that already exist in the master catalog for USERCAT4 are to be preserved and that the aliases on the portable file are to be listed. However, if USERCAT4 had not existed in the system when importing, the aliases on the portable file would have been defined for USERCAT4.
  • LOCK specifies that the catalog being imported is locked.
  • CATALOG identifies the master catalog, ICFMAST1.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014