COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
on-phrase
historical-on-phrase
excp-imperative-statement
is an imperative statement to be executed when an exception prevents calling the specified
program.
NOTE: Although you can specify excp-imperative-statement in any CALL
statement, it only works when the called program is a COBOL program. For programs
written in languages other than COBOL, it is ignored.
not-on-phrase
non-excp-imperative-statement
is an imperative statement to be executed when the specified program completes its
execution and returns control to the program that called it.
END-CALL
ends the scope of the CALL statement and makes it a delimited-scope statement. If you omit
END-CALL but include the EXCEPTION or NOT EXCEPTION phrase, the CALL statement is a
conditional statement and ends at the next period separator.
Usage Considerations:
• Currently Active Program
The currently active programThe currently active program, the one containing the CALL
statement, is the calling program; the program identified by program-name or by the value
of identifier is the called program.
• Effect of CALL Statement Without PORT Directive
If the object form of the called program is included in the run unit that contains the calling
program, or if the called program is in the user library, execution of the CALL statement transfers
control from the calling program to the called program. When the called program executes
an EXIT PROGRAM statement or allows control to pass beyond the end of its Procedure Division,
control returns to the calling program. If a NOT ON EXCEPTION phrase (not-on-phrase
) is specified, control passes to non-excp-imperative-statement and execution
296 Procedure Division Verbs










