z/OS DFSMSdfp Utilities
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Example 11: Replace a Load Module Using COPYMOD

z/OS DFSMSdfp Utilities
SC23-6864-00

In this example, a load module in an existing load library is replaced by another module. The new module originally resides on a 3390 DASD device, whereas the load library to which it is copied resides on a 3380. Because the module has a block size larger than the block size assigned to the output data set, the module must be reblocked before it is added to the load library.

This example illustrates how you can transfer load modules between devices of different sizes. In this case, updated modules are created on a 3390 and tested before being added to the load library for general use.
  //STEP1    EXEC PGM=IEBCOPY
  //REPLACE  JOB  ...
  //SYSPRINT DD  SYSOUT=A
  //TESTLIB  DD  DSN=JOHNDOE.COBOL.TESTLOAD,DISP=SHR,UNIT=3390,
  //             VOL=SER=TEST01,DCB=(BLKSIZE=23470)
  //PRODLIB  DD  DSN=PAYROLL.MASTER.LOADLIB,DISP=(OLD,KEEP)
  //             UNIT=3380,VOL=SER=PROD01,DCB=(BLKSIZE=19069)
  //SYSIN    DD  *
             COPYMOD OUTDD=PRODLIB,INDD=TESTLIB
             SELECT MEMBER=((WAGETAX,,R))
  /*
The control statements are discussed below:
  • TESTLIB DD defines a load library on a 3390 direct access device. It has a block size of 23470.
  • PRODLIB DD defines a load library on a 3380 direct access device. It has a block size of 19069.
  • SYSIN DD defines the control data set, which follows in the input stream.
  • The COPYMOD statement identifies PAYROLL.MASTER.LOADLIB as the output data set and JOHNDOE.COBOL.TESTLOAD as the input data set. The SELECT statement indicates that the load module WAGETAX is to be copied from the input data set and is to replace any member with that name that is in the output data set. The member is also reblocked to 19069.

Note that, in this case, COPYMOD has to be used in order to copy the member WAGETAX into the PAYROLL.MASTER.LOADLIB. Because the original block size of WAGETAX is larger than the largest block size that can reside in the output data set, attempting this operation with the COPY statement would be unsuccessful. The problem would be attributed to a DCB validation error because of incorrect block size.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014