Object and load module considerations

It is strongly recommended that you recompile all your PL/I source. However, if you do not recompile your source, and if you want to mix Enterprise PL/I code with older PL/I objects, you must be aware of the options that are recommended for compiling new code and of the restrictions on mixing old and new object code.

You must use the following options when compiling Enterprise PL/I code that will be mixed with older PL/I objects:
  • CMPAT(V2)
  • LIMITS( EXTNAME(7) )
  • NORENT
  • BACKREG(5)
  • BIFPREC(15)
In addition, as discussed in Understanding the new compiler's options, you might also want to use some or all of these options:
  • COMMON
  • DEFAULT( LINKAGE( SYSTEM ) )
  • DEFAULT( OVERLAP )
  • EXTRN( FULL )
  • NOWRITABLE(PRV)

Note that unless you use the NOWRITABLE(PRV) option, CONTROLLED variables cannot be shared between old and new code.

Even if all the options listed above are used, there are some restrictions on mixing old and new object code:

  • FILE variables and constants cannot be shared between old and new code with one exception: SYSPRINT can be shared by old and new code if the old code was linked under LE. However, a file written out by old code can be read by new code - and vice-versa.
  • Whenever old code is used, all fetch/release restrictions from the older product apply. In particular, if a new MAIN does successfully FETCH and CALL an old module, the old module cannot perform a subsequent FETCH of another module.
  • If any old code is present in an application, DLL code cannot be invoked.
  • There is no support for mixing OS PL/I V1R4 object with Enterprise PL/I objects.
  • For old code compiled with OS PL/I V2R3 or earlier (but later than V1R4), these restrictions apply:
    • An old MAIN not linked with Language Environment cannot FETCH a new module.
    • A new MAIN cannot CALL or FETCH an old module unless under either of the following conditions:
      • The new MAIN has the signature CSECT CEESG010 linked in.
      • The old module has been relinked with SCEELKED either after you have applied the PTF for APAR PK23270, or with an explicit INCLUDE SYSLIB(CEESG010).

Previously, Enterprise PL/I had the restriction that if your old code did any I/O, MAIN must have been compiled with an old compiler. This restriction no longer applies if you are using Language Environment 1.10 or later.