Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Language Reference


ENTRY statement

The ENTRY statement establishes an alternate entry point into a COBOL called subprogram.

The ENTRY statement cannot be used in:

When a CALL statement that specifies the alternate entry point is executed in a calling program, control is transferred to the next executable statement following the ENTRY statement.

Read syntax diagramSkip visual syntax diagram
Format

>>-ENTRY--literal-1--------------------------------------------->

>--+--------------------------------------------------------+--->
   |        .---------------------------------------------. |   
   |        |                          .--------------.   | |   
   |        V                          V              |   | |   
   '-USING------+-------------------+----identifier-1-+---+-'   
                +-+----+--REFERENCE-+                           
                | '-BY-'            |                           
                '-+----+--VALUE-----'                           
                  '-BY-'                                        

>--.-----------------------------------------------------------><

literal-1
Must be an alphanumeric literal that conform to the rules for the formation of a program-name in an outermost program (see PROGRAM-ID paragraph).

Must not match the program-ID or any other ENTRY literal in this program.

Must not be a figurative constant.

Execution of the called program begins at the first executable statement following the ENTRY statement whose literal corresponds to the literal or identifier specified in the CALL statement.

The entry point name on the ENTRY statement can be affected by the PGMNAME compiler option. For details, see the Enterprise COBOL Programming Guide.

USING phrase

For a discussion of the USING phrase, see The procedure division header.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)