


The ENTRY statement is used to establish an alternate entry point in the program.
General Format
ENTRY entry-name [ USING {parameter} ... ] .
Syntax Rules
1. entry-name is a non-numeric literal.
2. parameter is a data item defined with a level-number of 01 or 77 and it must appear in the linkage Section.
3. Each parameter cannot appear more than once in the USING phrase.
General Rules
1. entry-name must be unique within the program. No duplicates are allowed.
2. The maximum number of parameters that may be passed to an ENTRY point is 255.
3. If the USING phrase is used, then each parameter must be declared in the Linkage Section.
4. The constraints on the parameters are the same as those for the Procedure Division USING items. See section 6.5 "Procedure Division Format," for details.
5. There is a limit of 255 level 01 Linkage data items per program.
6. An ENTRY point can be called just like any other program; however, the program containing the ENTRY point must be loaded and present in memory at the time of the CALL. Once loaded, COBOL objects may be called by any of their ENTRY point names. See User's Guide, section 2.9, "Calling Subprograms," for details.
7. When a program is called by one of its ENTRY point names, the execution begins immediately after the ENTRY statement. The ENTRY point parameters are initialized in the same way as the Procedure Division parameters.
8. Execution of the program passes through entry points with no effect. There is a limit of 65536 ENTRY points per program, including the main entry point at the beginning of the Prodecure Division.