Summary -
In this topic, we described about the COPYGROUP with detailed example.
Indicates the beginning of a COPYGROUP operation. COPYGROUP statement used to begin a group copy, unload, or load.
A group consists members and its aliases. COPYGROUP treats the group as a single entity.
Syntax -
Label | Statement | Parameters |
---|---|---|
[label] | COPYGROUP | OUTDD=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.
//CPYGROUP 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 COPYGROUP 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
- COPYGROUP indicates the start of the copy operation.