Steps for rebinding a changed compile unit under z/OS® batch

Before you begin: Make a change to a single source file and rebuild the application.

Perform the following steps to recompile the single changed source file and make a replacement of its binder sections in the program:

  1. Recompile the single changed source file. Use the CSECT compiler option so that each section is named for purposes of rebindability. For example, assume that you have made a change to USERID.PLAN9.C(UNIT1). Recompile the source file using the EDCC procedure as follows:
    //* Compile UNIT1 user
    //CC EXEC EDCC,
    //             CPARM='OPTF(DD:OPTIONS)',
    //             INFILE='USERID.PLAN9.C(UNIT1)',
    //             OUTFILE='USERID.PLAN9.OBJ(UNIT1),DISP=SHR'
    //COMPILE.OPTIONS DD *
       LIST RENT LONGNAME DLL CSECT(MYPROG)
    /*

    _______________________________________________________________

  2. Rebind only the changed compile unit into the executable program, which replaces its corresponding binder sections in the program object:
    //BIND   EXEC CBCB,
    //       OUTFILE='USERID.PLAN9.LOADE,DISP=SHR'
    //OLDPGM  DD DSN=USERID.PLAN9.LOADE,DISP=SHR
    //NEWOBJ  DD DSN=USERID.PLAN9.OBJ,DISP=SHR
    //SYSIN DD *
       INCLUDE NEWOBJ(UNIT1)
       INCLUDE OLDPGM(MYPROG)
       NAME NEWPGM(R)
    /*

    _______________________________________________________________

Advantage

Rebinds are fast because most of the program is already bound, and none of the intermediate object modules are retained.