IEBCOPY Copying & Reblocking Load ModulesIEBCOPY Altering Load Modules
The COPYMOD statement lets COPY and reblocks the load modules to aappropriate block size for the target device.
The block size in the output data set is increased by COPYMOD as required to match the MAXBLK value.
COPYMOD does not write records longer than the output data set block size.
IEBCOPY will determine the amount of space remaining on a track before assigning a size to the next block to be written.
The maximum block size produced by the COPYMOD function is 32760 bytes.
The below example shows how load libraries can be developed on one type and then distributed to other types.
//RBLKCOPY JOB ... //REBLOCK EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=A //OLDLIB DD DSN=OLDLIB.LOADLIB,DISP=SHR //STDLLIB DD DSN=STDLLIB.LOADLIB,DISP=(OLD,KEEP), // UNIT=3390,VOL=SER=SER01,DCB=(BLKSIZE=25000) //SYSIN DD * COPYMOD OUTDD=STDLLIB,INDD=OLDLIB,MAXBLK=12000 /* //DISTRIB EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=A //STDLLIB DD DSN=STDLLIB.LOADLIB,DISP=SHR //OUTLIB DD DSN=OUTLIB.LOADLIB,DISP=(OLD,KEEP), // UNIT=3380,VOL=SER=SER02,DCB=(BLKSIZE=12000) //SYSIN DD * COPY OUTDD=OUTLIB,INDD=STDLLIB /*
Let’s discuss the example in detail.
- The REBLOCK EXEC statement begins the reblocking step.
- OLDLIB DD defines the cataloged load library OLDLIB.LOADLIB.
- STDLLIB DD defines an existing data set, STDLLIB.LOADLIB, which resides on a 3390 direct access device and has a block size of 25000.
- The COPYMOD statement in the SYSIN data set specifies that OLDLIB.LOADLIBis to be merged into STDLLIB.LOADLIB. It also specifies that STDLLIB.LOADLIBis to be reblocked with a maximum block size of 12000.
- The DISTRIB EXEC statement begins the distribution step, where the reblocked data set is copied to devices with different maximum block sizes.
- STDLLIB DD defines the same data set that was reblocked in the previous step.
- OUTLIB DD defines the data set OUTLIB.LOADLIB, which resides on a 3380 direct access device.
- The COPY statements in the SYSIN data set specify that the data set STDLLIB.LOADLIBis to be copied to the output data sets without being reblocked.
If OUTLIB.LOADLIBhad not been reblocked to the smaller block size, this step would end unsuccessfully.IEBCOPY Altering Load Modules