ENTRY statement

The ENTRY statement specifies a secondary entry point of a procedure. The ENTRY statement must be internal to the procedure for which it defines a secondary entry point. It cannot be within a do-group that specifies repetitive execution, or internal to a ON-unit.

Read syntax diagramSkip visual syntax diagram
   .--------------.                                 
   V              |                                 
>>---entry-label:-+--ENTRY--+-------------------+--------------->
                            |   .-,---------.   |   
                            |   V           |   |   
                            '-(---parameter-+-)-'   

>--+----------------------------+------------------------------->
   '-EXTERNAL(environment-name)-'   

>--+--------------------------+--+------------------+--;-------><
   |          .-----------.   |  '-OPTIONS(options)-'      
   |          V           |   |                            
   '-RETURNS(---attribute-+-)-'                            

entry-label
The secondary entry point to the procedure.
parameter
See Parameter attribute and Passing arguments to procedures.
Start of changeEXTERNAL (environment name)End of change
Start of changeIs a scope attribute discussed in Scope of declarations.End of change
RETURNS option
See RETURNS option and attribute.
OPTIONS option
See OPTIONS option and attribute.

All parameters on an ENTRY statement must be BYADDR, and for a procedure containing ENTRY statements, all non-pointer parameters to that procedure must be BYADDR.

If a procedure that contains ENTRY statements has the RETURNS option, or if any of its contained ENTRY statements have the RETURNS option, the following conditions apply:

When a procedure contains ENTRY statements and some, but not all of its entry points have the RETURNS attribute, the ERROR condition is detected under the following circumstances: