Summary -
In this topic, we described about the COPYMOD with detailed example.
Indicates the beginning of a copy and load module reblock operation. COPYMOD statement used to copy load module libraries that to reblock.
The output data set must be partitioned. The input data set may be a partitioned or a sequential data set created by an unload operation.
Syntax -
Label | Statement | Parameters |
---|---|---|
[label] | COPYGROUP | OUTDD=DDname ,INDD=[(]{DDname|(DDname,R) }[,...][)] [,MAXBLK={nnnnn|nnK}] [,MINBLK={nnnnn|nnK}] [,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.
MAXBLK={nnnnn|nnK}
specifies the maximum block size for records in the output PDS. The nnnnn value is specified as a decimal number;
K
K indicates that the nn value is to be multiplied by 1024 bytes. MAXBLK may be specified with or without MINBLK.
MINBLK={nnnnn|nnK}
specifies the minimum block size for records in the output PDS. The nnnnn value is specified as a decimal number;
K indicates that the nn value is to be multiplied by 1024 bytes. MINBLK may be specified with or without MAXBLK.
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.
//STEP1 EXEC PGM=IEBCOPY
//REPLACE JOB ...
//SYSPRINT DD SYSOUT=A
//TESTLIB DD DSN=TEST.LOADLIB,DISP=SHR,UNIT=3390,
// VOL=SER=TEST01
//PRODLIB DD DSN=PROD.LOADLIB,DISP=(OLD,KEEP)
// UNIT=3380,VOL=SER=PROD01
//SYSIN DD *
COPYMOD OUTDD=PRODLIB,INDD=TESTLIB
SELECT MEMBER=((NEWPROG,,R))
/*
Let’s discuss the example in detail.
- TESTLIB, PRODLIB DD defines a load library.
- SYSIN DD defines the instream control data set.
- The COPYMOD statement identifies PROD.LOADLIB as the output data set and TEST.LOADLIB as the input data set.
- The SELECT statement indicates the load module NEWPROG is to be copied from the input data set with replace if already exists.