Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Determining the main routine z/OS Language Environment Writing Interlanguage Communication Applications SA38-0684-00 |
||||||||||
In Language Environment, only one routine can be the main routine. If a PL/I routine is identified as a main routine in an ILC application using PROC OPTIONS(MAIN) and a C main function does not exist, the PL/I main routine is the first to gain control. If a C main function exists, but no PL/I main routine is identified in the ILC application, the C main function gains control first. If both a PL/I main routine identified by PROC OPTIONS(MAIN) and a C main function exist in the same ILC application, this is a user error. However, the error is not detected by Language Environment. An entry point is defined for each supported HLL. Table 1 identifies the desired entry point. The table assumes that your code was compiled using the Language Environment-conforming compilers.
When link-editing a PL/I module that is fetched, the name of the routine that is being fetched must be the entry point of the load module, unless the FETCHABLE option is specified on the PROCEDURE statement in the PL/I routine. When link-editing a C module that is fetched, the name of the routine being fetched must be the entry point of the load module, unless #pragma linkage (,fetchable) is specified in the C routine. You cannot have more than one entry point in an ILC application with #pragma linkage (,fetchable) or PL/I FETCHABLE option on the PROCEDURE statement. This error is not detected by Language Environment, but can cause unpredictable results. |
Copyright IBM Corporation 1990, 2014
|