



The CALL statement transfers control from one object program to another within the run unit.
The program containing the CALL statement is the calling program; the program identified in the CALL statement is the called subprogram. Called programs can contain CALL statements; however, a called program must not execute a CALL statement that directly or indirectly calls the calling program.
___ Format _______________________________________________________________________________________
| |
| >>__CALL__ _identifier-1______ ________________________________________________________________> |
| |_literal-1_________| |
| |_ procedure-ptr-1 _| |
| |
| >__ ______________________________________________________________________________ ____________> |
| | <___________________________________________________________________ | |
| | <____________________________________ | | |
| |_USING____ _ ___________________ ____ _ ______________ __identifier-2_ _|_ _|_| |
| | |_ ____ __REFERENCE_| | |_ ADDRESS OF _| | | |
| | |_BY_| | (1) | | |
| | |_ file-name-1 __________________| | |
| | |_ OMITTED ______________________| | |
| | <____________________________________ | |
| |_ ____ __CONTENT____ _ ______________ __identifier-3_ _|_______| |
| | |_BY_| | |_ ADDRESS OF _| | | |
| | | |_ LENGTH OF __| | | |
| | |_ literal-2 ____________________| | |
| | |_ OMITTED ______________________| | |
| | <______________________________________ | |
| |_ ______ __ VALUE ____ _ ______________ __ identifier-4 _ _|___| |
| |_ BY _| | |_ ADDRESS OF _| | |
| | |_ LENGTH OF __| | |
| |_ literal-3 ______________________| |
| |
| >__ _______________________________ __ ________________________________________________ _______> |
| |__ RETURNING __ identifier-5 __| |_ __________________ __ ______________________ _| |
| | |_| on_exception |_| |_| not_on_exception |_| | |
| |_ ____ __OVERFLOW__imperative-statement-3_______| |
| |_ON_| |
| |
| >__ __________ _______________________________________________________________________________>< |
| |_END-CALL_| |
| |
| on_exception: |
| |__ ___________________________________________ _______________________________________________| |
| |_ ____ __EXCEPTION__imperative-statement-1_| |
| |_ON_| |
| |
| not_on_exception: |
| |__ ________________________________________________ __________________________________________| |
| |_NOT__ ____ __EXCEPTION__imperative-statement-2_| |
| |_ON_| |
| |
| Note: |
X | (1) File-name-1 is supported on OS/390 and VM only. |
| |
|__________________________________________________________________________________________________|
For information on how the compiler resolves CALLs to program names found in multiple programs, see "Conventions for Program-Names" in topic 2.1.1.1.
Subtopics:
© Copyright IBM Corp. 1991, 1998
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.