Import an Entry-Sequenced Cluster in a Catalog: Example 4

In this example, an entry-sequenced cluster, X98.EXAMPLE.ESDS1, is imported from a portable file, TAPE1. This example is associated with EXPORT example, Export an Entry-Sequenced Cluster: Example 3. The cluster is defined in a different catalog than the one from which it was exported, assigned a new name, and imported to a different volume.
//IMPORT3  JOB  ...
//STEP1    EXEC PGM=IDCAMS
//SOURCE   DD   DSNAME=TAPE1,UNIT=(TAPE,,DEFER),DISP=OLD,
//   VOL=SER=001147,LABEL=(1,SL)
//SYSPRINT DD   SYSOUT=A
//SYSIN    DD   *
     IMPORT -
           INFILE(SOURCE) -
           OUTDATASET(BCN.EXAMPLE.ESDS3) -
           OBJECTS -
             ((X98.EXAMPLE.ESDS1 -
               NEWNAME(BCN.EXAMPLE.ESDS3) -
               VOLUMES(VSER02))) -
            CATALOG(VCBUCAT1)
/*
Job control language statement:
  • SOURCE DD describes the portable file, TAPE1, which resides on a magnetic tape file, that is not mounted by the operator until access method services opens TAPE1 for processing.

    The IMPORT command moves the contents of TAPE1 into the system. Access method services reorganizes the data records. The parameters are:

  • INFILE points to the SOURCE DD statement.
  • OBJECTS changes some of the attributes for the object being imported:
    • X98.EXAMPLE.ESDS1 identifies the entry-sequenced cluster as it is currently named on TAPE1.
    • NEWNAME specifies that the cluster's name is to be changed to BCN.EXAMPLE.ESDS3.
    • VOLUMES identifies the new volume on which the cluster is to reside.
  • CATALOG identifies the catalog, VCBUCAT1, to contain the cluster's catalog entry.