The following is the sample of a JCL statement to execute this utility program.
//GP4ABC JOB (RR, 1235,,,,8,,U),’MR. XYZ’,CLASS=S,
// MSGCLASS=G,MSGLEVEL=1,NOTIFY=GP4ABC
//*
//***********************************************************
//* THIS PROGRAM COPIES ONE FILE TO A BACKUP
//***********************************************************
//STEP1 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//COPYLIB DD DSN=TSGBAXC.SACRED.DATA,DISP=SHR
//BKUPLIB DD DSN=TSGBAXC.BKUP.SACRED.DATA,
// DISP=(,CATLG,DELETE),
// UNIT=DISK,
// SPACE=(CYL,(20,2),RLSE),
// DCB=(DSORG=
//SYSUT3 DD UNIT=SYSDA,
// SPACE=(TRK,(1,1))
//SYSUT4 DD UNIT=SYSDA,
// SPACE=(TRK,(1,1))
//SYSIN DD *
COPY OUTDD=BKUPLIB,INDD=COPYLIB
COPYLIB - Is the data that needs to be copied to a backup
BKUPLIB - Is the backup library where COPYLIB was copied or
backed up
SYSUT3 - IBM advised mandatory DDNAME for this process
SYSUT4 - IBM advised mandatory DDNAME for this process
OUTDD - Shows the receiving library in this process, the right
operand must match the DDNAME in the body of the
JCL.
INDD - Shows the sending library in this process, the right
operand must match the DDNAME in the body of the
JCL.
The following JCL is an example for data compression.
//GP4ABC JOB (RR, 1235,,,,8,,U),’MR. XYZ’,CLASS=S,
// MSGCLASS=G,MSGLEVEL=1,NOTIFY=GP4ABC
//*
//***********************************************************
//* THIS PROGRAM COMPRESSES THE LIBRARY WHERE UNUSED //* SPACES ARE AVAILABLE.
//***********************************************************
//STEP1 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//COPYLIB DD DSN=TSGBAXC.SACRED.DATA,DISP=SHR
//SYSUT3 DD UNIT=SYSDA,
// SPACE=(TRK,(1,1))
//SYSUT4 DD UNIT=SYSDA,
// SPACE=(TRK,(1,1))
//SYSIN DD *
COPY OUTDD=COPYLIB,INDD=COPYLIB
In this example,
COPYLIB - Is the data that needs to be compressed
SYSUT3 - IBM advised mandatory DDNAME for this process
SYSUT4 - IBM advised mandatory DDNAME for this process
OUTDD - Shows the library name after compression
INDD - Shows the library name before compression, which is
same as OUTDD
It can be observed that in both the cases, the same DDNAME has been used, which IEBCOMPR will understand as a case of compression.
This utility can also be used for selective copying or backup where the whole PDS need not be copied or backed up. The control statement will prompt the utility which are the members need to be copied.
The following JCL is an example for selective copying.
//GP4ABC JOB (RR, 1235,,,,8,,U),’MR. XYZ’,CLASS=S,
// MSGCLASS=G,MSGLEVEL=1,NOTIFY=GP4ABC
//*
//***********************************************************
//* THIS PROGRAM WILL COPY ONLY DESIRED MEMBERS.
//***********************************************************
//STEP1 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//COPYLIB DD DSN=TSGBAXC.SACRED.DATA,DISP=SHR
//ARXLIB DD DSN=TSGBAXC.SELECT.SACRED.DATA,
// DISP=(,CATLG,DELETE),
// UNIT=DISK,
// SPACE=(CYL,(20,2),RLSE),
// DCB=(DSORG=
//SYSUT3 DD UNIT=SYSDA,
// SPACE=(TRK,(1,1))
//SYSUT4 DD UNIT=SYSDA,
// SPACE=(TRK,(1,1))
//SYSIN DD *
COPY OUTDD=ARXLIB,INDD=COPYLIB
SELECT MEMBER= BDREC,CRMREC,ARXREC,OIREC
In this example,
COPYLIB - Is the source library
ARXLIB - Is the target library
SYSUT3 - IBM advised mandatory DDNAME for this process
SYSUT4 - IBM advised mandatory DDNAME for this process
OUTDD - Shows the receiving library DDNAME
INDD - Shows the sending library DDNAME
SELECT - Shows the desired members need to be copied or backed
up
No comments:
Post a Comment