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.
.--------------. V | >>---entry-label:-+--ENTRY--+-------------------+---------------> | .-,---------. | | V | | '-(---parameter-+-)-' >--+----------------------------+-------------------------------> '-EXTERNAL(environment-name)-' >--+--------------------------+--+------------------+--;------->< | .-----------. | '-OPTIONS(options)-' | V | | '-RETURNS(---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: