Examples

In the following example, your user prefix is RYAN, and the data set containing the input object module is a partitioned data set called RYAN.C.OBJ(INCCOMM). This example will generate a prelink listing without using the automatic call library. After the call, the load module is placed in a partitioned data set called RYAN.CPOBJ.LOAD(TEMPNAME) and the prelink listing is placed in a sequential data set called RYAN.CPOBJ.RMAP.
CPLINK OBJ('C.OBJ(INCCOMM)')

In the following examples, assume that your user prefix is DAVE, and the data set containing the input object module is a partitioned data set called DAVE.C.OBJ(INCPYRL). This example will not generate a prelink listing, and the automatic call facility will use the library HOOVER.LIB.SUB. The load module is placed in the partitioned data set DAVE.TBD.LOAD(MOD).

Figure 1. Example of prelinking under batch
//*-----------------------------------------------------------
//* Prelink and link 'DAVE.C.OBJ(INCPYRL)'
//*-----------------------------------------------------------
//P0014001  EXEC EDCPL,
//          INFILE='DAVE.C.OBJ(INCPYRL)',
//          OUTFILE='DAVE.TBD.LOAD(MOD),DISP=SHR',
//          PPARM='NOMAP,NONCAL',
//          PLIB='HOOVER.LIB.SUB',
//          LPARM='AMODE(31),RMODE(ANY) '
//*----------------------------------------------------------
Figure 2. Example of prelinking under TSO/E
CPLINK OBJ('''DAVE.C.OBJ(INCPYRL)''')
      POPT('NOMAP,NONCAL')
      PLIB('''HOOVER.LIB.SUB''')
      LOAD('TBD.LOAD(MOD)')