Steps for binding each compile unit under TSO

Before you begin: Compile and bind each source file.

Perform the following steps to complete a final bind of all the partially bound units:

  1. Compile and bind each source file to generate the partially bound program objects PLAN9.LOADE(UNIT0), PLAN9.LOADE(UNIT1), and PLAN9.LOADE(UNIT2), which may have unresolved references. In this example, references to f1() and f4() in PLAN9.LOADE(UNIT0) are unresolved. Compile and bind each unit by using the CC and CXXBIND REXX execs as follows:
    CC PLAN9.C(UNIT0) OBJECT(PLAN9.OBJ) CSECT(MYPROG)
    CXXBIND OBJ(PLAN9.OBJ(UNIT0)) OPT('LET,CALL(NO)')
       LOAD(PLAN9.LOADE(UNIT0))
    
    CC PLAN9.C(UNIT1) OBJECT(PLAN9.OBJ) CSECT(MYPROG)
    CXXBIND OBJ(PLAN9.OBJ(UNIT1)) OPT('LET,CALL(NO)')
       LOAD(PLAN9.LOADE(UNIT1))
    
    CC PLAN9.C(UNIT2) OBJECT(PLAN9.OBJ) CSECT(MYPROG)
    CXXBIND OBJ(PLAN9.OBJ(UNIT2)) OPT('LET,CALL(NO)')
       LOAD(PLAN9.LOADE(UNIT1))

    The CALL(NO) option prevents autocall processing.

    _______________________________________________________________

  2. Perform the final single bind to produce the executable program MYPROG by using the CXXBIND REXX exec:
    CXXBIND OBJ(PLAN9.LOADE(UNIT0), PLAN9.LOADE(UNIT1), PLAN9.LOADE(UNIT2))
       LOAD(PLAN9.LOADE(MYPROG))

    _______________________________________________________________

Advantage

Binding a set of partially bound program objects into a fully bound program object is faster than binding object modules into a fully bound program object. For example, a central build group can create the partially bound program objects. You can then use these program objects and their changed object modules to create a development program object.