z/OS DFSMSdfp Utilities
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Example 15: Copy Groups from a PDSE to a PDSE with Replace

z/OS DFSMSdfp Utilities
SC23-6864-00

In this example, members and their aliases are copied in groups from a PDSE to a PDSE with the replace (R) option. See Replacing Program Objects for information about replacing groups with COPYGRP.
  //CPYGRP    JOB  ...
  //STEP1     EXEC PGM=IEBCOPY
  //SYSPRINT  DD  SYSOUT=A
  //DDIN      DD  DSNAME=PDSESETA,DISP=SHR
  //DDOUT     DD  DSNAME=PDSESETB,LIKE=PDSESETA,DSNTYPE=LIBRARY,
  //          DISP=(NEW,CATLG)
  //SYSUT3    DD  UNIT=SYSDA,SPACE=(TRK,(1,1))
  //SYSIN     DD  *
  GROUPCPY   COPYGRP  INDD=((DDIN,R)),OUTDD=DDOUT
  /*
The control statements are discussed below:
  • DDIN DD defines the input data set, PDSE, which is a partitioned data set extended.

    DDOUT DD defines the output data set, PDSE, which is a partitioned data set extended.

    The LIKE parameter indicates that the DCB and SPACE attributes for PDSESETB are to be copied from PDSESETA.

    The DSNTYPE parameter defines the new data set as a PDSE.

    The Storage Management Subsystem chooses an appropriate volume for the allocation.

  • SYSUT3 DD defines a temporary spill data set.
  • SYSIN DD defines the control data set, which follows in the input stream. The data set contains a COPYGRP statement, an INDD statement, and an OUTDD statement.
  • COPYGRP indicates the start of the copy operation.

    The ((INDD,R)) parameter shows PDSESETA as the input data set containing members to replace members with the same name in PDSESETB.

    The OUTDD parameter shows PDSESETB as the output data set.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014