Determining the main routine

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 by 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 has been compiled using the Language Environment-conforming compilers.

Table 1. Determining the entry point
HLL Main entry point Fetched entry point
C++ CEESTART Not supported
PL/I CEESTART CEESTART or routine name, if OPTIONS(FETCHABLE) is used.