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; no other routine in the enclave can use syntax that indicates it is main. If you write the main routine in C++, you must use language syntax to identify the routine as the main routine. If you use COBOL as the first program in the enclave that is to gain control, the program is effectively designated main by being the first to run. Table 1 describes how C++ and COBOL identify the main routine.
An entry point is defined for each supported HLL. Table 2 identifies the desired entry point. The table assumes that your code has been compiled using the Language Environment-conforming compilers.
COBOL and C++ routines that make up an ILC application are executed together in a single run unit (the equivalent of a Language Environment enclave). However, unlike in earlier versions of COBOL (VS COBOL II and OS/VS COBOL), the first COBOL program in a run unit is no longer necessarily considered the main routine. If the first COBOL program is not the first routine in the enclave to run, it is considered a subroutine in the Language Environment enclave. |
Copyright IBM Corporation 1990, 2014
|