IEBCOPY COPYGRP

IEBCOPY COPY COPYGROUP

Advertisements


Indicates the beginning of a COPYGRP operation.

COPYGRP statement used to begin a group copy, unload, or load.

A group consists members and its aliases.


Syntax:

LabelStatementParameters
[label]COPYGRPOUTDD=DDname
,INDD={DDname|((DDname,R))} [,LIST={YES|NO}]

OUTDD=DDname

specifies the output DD statement dataset name.


INDD=[(]{DDname| (DDname,R)}[,...][)]

specifies the input DD statement dataset names.


R

specifies that the members to be copied or loaded from input data set are to replace any identically named members on the output PDS.


LIST={YES|NO}

specifies names of the copied members are to be listed in the SYSPRINT data set.

When ignored, the default from the EXEC PARM will be applied


Example:


Members and their aliases are copied from a PDSE to a PDSE.


  //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,OUTDD=DDOUT
  /*

  

Let’s discuss the example in detail.


  • PDSESETA,PDSESETB is a partitioned data set extended.
  • SYSUT3 DD defines a temporary data set.
  • SYSIN DD defines the instream control data set
  • COPYGRP indicates the start of the copy operation.

IEBCOPY COPY COPYGROUP

Advertisements