Steps for single final bind under z/OS® batch

Before you begin: Compile each source file.

Perform the following steps to complete a final single bind of everything:

  1. Compile each source file to generate the object modules USERID.PLAN9.OBJ(UNIT0), USERID.PLAN9.OBJ(UNIT1), and USERID.PLAN9.OBJ(UNIT2). Use the EDCC procedure as follows:
    //COMP0  EXEC EDCC,
    //       INFILE='USERID.PLAN9.C(UNIT0)',
    //       OUTFILE='USERID.PLAN9.OBJ,DISP=SHR',
    //       CPARM='LONG,RENT'
    //COMP1  EXEC EDCC,
    //       INFILE='USERID.PLAN9.C(UNIT1)',
    //       OUTFILE='USERID.PLAN9.OBJ,DISP=SHR',
    //       CPARM='LONG,RENT'
    //COMP2  EXEC EDCC,
    //       INFILE='USERID.PLAN9.C(UNIT2)',
    //       OUTFILE='USERID.PLAN9.OBJ,DISP=SHR',
    //       CPARM='LONG,RENT'

    _______________________________________________________________

  2. Perform a final single bind to produce the executable program USERID.PLAN9.LOADE(MYPROG). Use the CBCB procedure as follows:
    //BIND EXEC CBCB,OUTFILE='USERID.PLAN9.LOADE,DISP=SHR'
    //OBJECT DD DSN=USERID.PLAN9.OBJ,DISP=SHR
    //SYSIN DD *
      INCLUDE OBJECT(UNIT0)
      INCLUDE OBJECT(UNIT1)
      INCLUDE OBJECT(UNIT2)
      NAME MYPROG(R)
    /*

    The OUTFILE parameter along with the NAME control statement specify the name of the output executable to be created.

    _______________________________________________________________

Advantage

This method is simple, and is consistent with existing methods of building applications, such as makefiles.