Export a Catalog: Example 1

In this example, the catalog, USERCAT4, is exported but not disconnected. The catalog is copied to a portable file, CATBACK, and its catalog entry is modified to indicate it was exported temporary. If the user catalog is cataloged in the master catalog, aliases of the catalog are also exported.
//EXPRTCAT JOB   ...
//STEP1    EXEC  PGM=IDCAMS
//RECEIVE  DD    DSNAME=CATBACK,UNIT=(TAPE,,DEFER),
//         DISP=(NEW,KEEP),VOL=SER=327409,LABEL=(1,SL)
//SYSPRINT DD    SYSOUT=A
//SYSIN    DD    *
     EXPORT -
           USERCAT4 -
           OUTFILE(RECEIVE) -
           TEMPORARY
/*
Job control language statements:
  • RECEIVE DD describes the portable file that is to receive a copy of the catalog.
The EXPORT copies the catalog, USERCAT4, and its aliases to a portable file, CATBACK. The parameters are:
  • USERCAT4 identifies the object to be exported.
  • OUTFILE points to the RECEIVE DD statement. The RECEIVE DD statement describes the portable data set, CATBACK, that is to receive a copy of the catalog.
  • TEMPORARY specifies that the catalog is not to be deleted. The catalog is marked "temporary" to indicate that another copy exists and that the original copy can be replaced. This is a required parameter when exporting a catalog that cannot be exported with the PERMANENT parameter.