Language Environment coding requirements for PL/I applications
All PL/I programs are executed under the runtime support provided by Language Environment®. There are some additional coding requirements compared to pre-Language Environment PL/I programs.
Language Environment runtime options, if needed, can be specified in a plixopt character string. See Defining runtime options for Language Environment and the z/OS Language Environment Programming Reference for information about customizing runtime options.
If you are converting a PL/I program that was previously compiled with a non-Language Environment-conforming compiler, you must ensure that NOSTAE and NOSPIE are not specified in a plixopt string, because either of these will cause Language Environment to set TRAP (OFF). TRAP (ON) must be in effect for applications to run successfully.
Entry point
CEESTART is the only entry point for PL/I applications running under Language Environment. This entry point is set for programs compiled using Language Environment-conforming compilers.
INCLUDE SYSLIB(CEESTART)
INCLUDE SYSLIB(CEESG010)
INCLUDE SYSLIB(DFHELII)
REPLACE PLISTART
CHANGE PLIMAIN(CEEMAIN)
INCLUDE mainprog
INCLUDE subprog1
.......
.......
ORDER CEESTART
ENTRY CEESTART
NAME progname(R) The INCLUDE statement for the object modules must come immediately after the CHANGE statement. There is also a requirement under Language Environment that the main program must be included before any subroutines. (This requirement did not exist for modules produced by non-conforming compilers.)
For Enterprise PL/I programs that are compiled with OPTIONS(FETCHABLE), the binder ENTRY statement must be the name of the PROCEDURE.
Re-link utility for PL/I
If you have only the load module for a CICS program compiled by a non-conforming compiler, there is a file of linkage editor input, IBMWRLKC, specifically for CICS programs, located in the sample library SCEESAMP. This input file replaces OS PL/I library routines in a non-conforming executable program with Language Environment routines.
For more information about using IBMWRLKC, see the PL/I MVS™ & VM Compiler and Runtime Migration Guide.
Communicating between conforming and non-conforming PL/I routines
Language Environment-conforming PL/I programs can CALL a program that appears in a FETCH or RELEASE statement and can RELEASE it subsequently.
You can link-edit non-Language Environment-conforming PL/I subroutines with a Language Environment-conforming main program.
Static calls are supported from any version of PL/I, but dynamic calls are supported only from Language Environment-conforming procedures.
Called subroutines can issue CICS commands if the address of the EIB is available in the subroutine. You can achieve this either by passing the address of the EIB to the subroutine, or by coding EXEC CICS ADDRESS EIB(DFHEIPTR) in the subroutine before issuing any other CICS commands.
Abend handling
If a CICS PL/I program abends under Language Environment, your CICS abend handlers are given a Language Environment abend code, rather than a PL/I abend code.
To avoid changing your programs, you can modify the sample user condition handler, CEEWUCHA, supplied by Language Environment in the SCEESAMP library. This user condition handler can be made to return PL/I abend codes instead of the Language Environment codes. Use the USRHDLR runtime option to register it to do this. For details of this option see the z/OS Language Environment Programming Guide.
Ensure that the sample user condition handler, CEEWUCHA, is available at runtime (for example by using the STEPLIB concatenation or LPA). Define the condition handler in the CICS system definition data set (CSD) for your CICS region, rather than using program autoinstall.