z/OS Language Environment Writing Interlanguage Communication Applications
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. The main routine should be presented to the linkage editor first.

A Fortran routine is designated as a main routine with a PROGRAM statement, which indicates the name of the main routine. A Fortran routine can also be designated as a main routine in the absence of the PROGRAM, SUBROUTINE, and FUNCTION statements, in which case the name of the main routine has a default value of MAIN (or MAIN# for VS FORTRAN Version 2 Releases 5 and 6).

A PL/I routine is designated as a main routine with the OPTIONS(MAIN) option on the PROCEDURE statement.

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.

Table 1. Determining the entry point
HLL Main entry point Fetched entry point
Fortran Name on the PROGRAM statement or MAIN (or MAIN# for VS FORTRAN Version 2 Releases 5 and 6). Name on a SUBROUTINE or FUNCTION statement
PL/I CEESTART CEESTART or routine name, if OPTIONS(FETCHABLE) is used.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014