COBOL syntax

In COBOL, use the following syntax to invoke Language Environment callable services:

Read syntax diagramSkip visual syntax diagram
Syntax

>>-CALL "CEExxxx" USING-- parm1parm2, ...parmnfc-----------><

You can call Language Environment services either statically or dynamically from COBOL applications.

The Language Environment® callable services are architected as low maintenance stubs that branch to the actual runtime routine that performs the service. Static CALL to these stubs is the preferred choice for best performance. This avoids the overhead of a COBOL dynamic call without the usual maintainability disadvantage of a more robust statically link-edited routine.

See Parameter list for invoking callable services for a description of this syntax.

You can use the SCEESAMP file CEEIGZCT to declare symbolic Language Environment feedback codes, in conjunction with a COBOL call to a Language Environment callable service to return a feedback code, as shown in Figure 1.

Figure 1. Sample callable services invocation syntax for COBOL
COPY CEEIGZCT.
CALL "CEExxxx" USING parm1, parm2, ... parmn, fc

COBOL for MVS & VM Release 2 or later also allows you to omit arguments. In place of the argument, use the OMITTED parameter, as shown below. See Figure 1 and Figure 3 for an example of omitting parameters in COBOL.

Read syntax diagramSkip visual syntax diagram
Syntax

>>-CALL "CEExxxx" USING-- parm1parm2, ...parmnOMITTED------><