Calls an entry name in the application program. The entry name
must be a valid external entry point name (that is, callable from
other compile units).

>>-CALL--+-identifier-+--+----------------------------------+--->
'-literal----' | .-----------------------. |
| V | |
'-USING----| identifier_clause |-+-'
>--;-----------------------------------------------------------><
identifier_clause
.------------.
V |
|--+-+-------------------+--+-------------+----identifier-+-+---|
| '-+----+--REFERENCE-' '-ADDRESS--OF-' |
| '-BY-' |
| .---------------------------------. |
| V | |
'-+----+--CONTENT----+-+-------------+--identifier-+-+---'
'-BY-' | +-ADDRESS--OF-+ |
| '-LENGTH--OF--' |
'-literal---------------------'
- identifier
- A valid z/OS® Debugger COBOL identifier.
- literal
- A valid COBOL literal.
Usage
notes
- If you have a COBOL entry point name that is the same as a z/OS Debugger procedure
name, the procedure name takes precedence when using the CALL command.
If you want the entry name to take precedence over the z/OS Debugger procedure
name, you must qualify the entry name when using the CALL command.
- You can use the CALL entry_name command
to change program flow dynamically. You can pass parameters to the
called module.
- The CALL follows the same rules as calls within the
COBOL language.
- The COBOL ON OVERFLOW and ON EXCEPTION phrases
are not supported, so END-CALL is not supported.
- Only calls to separately compiled programs are supported; nested
programs are not callable by this z/OS Debugger command (they can of course
be started by GOTO or STEP to a compiled-in CALL).
- All calls are dynamic, that is, the called program (whether specified
as a literal or as an identifier) is loaded when
it is called.
- See Enterprise COBOL for z/OS Language Reference for an explanation of the following
COBOL keywords: ADDRESS, BY, CONTENT, LENGTH, OF, REFERENCE,
USING.
- An entry_name cannot refer to a method.
- A windowed date field cannot be specified as the identifier containing
the entry name.
- The CALL entry_name command
cannot be used while you replay recorded statements by using the PLAYBACK commands
by using the PLAYBACK command.
Example
Call the entry name
sub1 passing the variables
a,
b,
and
c.
CALL "sub1" USING a b c;
Refer to the following topics
for more information related to the material discussed in this topic.