Programs that require the C370 Common Library environment
Some legacy modules will require the C/370™ Common Library environment unless they have been converted to use Language Environment® services. These incompatible modules might, for example, contain ILCs to COBOL or use the library function ctest() to invoke the Debug Tool.
There are several methods of converting C/370 modules to use Language Environment services.
These methods are:
- Link from the original objects, using Language Environment services. The EDCSTART and CEEROOTB modules must be explicitly included.
- Relink the C/370 program, using the Language Environment CSECT
replacement. The EDCSTART and CEEROOTB modules must be explicitly
included.
Figure 1 shows an example of a job that uses this method. The job converts the C/370 program by relinking it and explicitly including the Language Environment CEESTART module, so that it replaces the C/370 CEESTART module.
This is a general-purpose job. The comments show the other include statements that are necessary if certain calls are present in the code. Refer to Linkage editor control statements for modules that contain calls to COBOL routines for the specific control statements that are necessary for different kinds of ILCs with COBOL.
Figure 1. Link job for converting programs//Jobcard information //* //**************************************************************************// //*RELINK C/370 V2 USER MODULE FOR Language Environment *// //**************************************************************************// //* //* //LINK EXEC PGM=HEWL,PARM='RMODE=ANY,AMODE=31,MAP,LIST' //SYSPRINT DD SYSOUT=* //SYSLIB DD DSN=CEE.SCEELKED,DISP=SHR //SYSLMOD DD DSN=TSUSER1.A.LOAD,DISP=SHR //SYSUT1 DD UNIT=VIO,SPACE=(CYL,(10,10)) //SYSLIN DD * INCLUDE SYSLIB(EDCSTART) ALWAYS NEEDED INCLUDE SYSLIB(CEEROOTB) ALWAYS NEEDED INCLUDE SYSLIB(@@CTEST) NEEDED ONLY IF CTEST CALLS ARE PRESENT INCLUDE SYSLIB(@@C2CBL) NEEDED ONLY IF CALLS ARE MADE TO COBOL INCLUDE SYSLIB(@@CBL2C) NEEDED ONLY IF CALLS ARE MADE FROM COBOL INCLUDE SYSLMOD(HELLO) ENTRY CEESTART NAME HELLO(R) /*
- For modules that have a C main() procedure:
- Replace the C/370 program by recompiling the source (if available).
- Recompile the source containing the main() procedure with the z/OS® V2R2 XL C/C++ compiler.
- Relink the objects with Language Environment services.
Note: This ensures that CEESTART uses the Language Environment initialization scheme. This is an alternative to including EDCSTART explicitly when linking from objects.