Rational Developer for System z
COBOL for Windows, Version 7.5, 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.

Format
Read syntax diagramSkip visual syntax diagram>>-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 COBOL for Windows Programming Guide.

USING phrase

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


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)