Steps for generating a reentrant load module in C++

Perform the following steps to generate a reentrant load module in C++:

  1. Compile your source code.

    If you see the symbol @STATIC defined in the writable static section, your code contains unnamed writable static such as modifiable literal strings, or variables with the static qualifier. To make literal strings stay in the code area, recompile with #pragma strings(readonly), and prelink again.

    _______________________________________________________________

  2. Use the supplied prelink and link utilities on the module. Under TSO, you can use the CXXMOD REXX EXEC to both prelink and link your module. Under z/OS® batch, use these JCL procedures:
    • CBCCL: compile and link
    • CBCL: link
    • CBCCLG: compile, link, and go
    • CBCLG: link and go

    For all of these, linking involves two steps: invocation of the prelinker, and then a call to the system linker.

    _______________________________________________________________