The CALLINTERFACE directive specifies the interface convention for CALL statements. The convention specified stays in effect until another CALLINTERFACE specification is made in the compilation unit.
| Format |
|---|
|
Specify >>CALLINTERFACE only in the procedure division.
The positions of CALL statements relative to the CALLINTERFACE directive are recognized following any processing of COPY and REPLACE statements. For example, CALL statements and CALLINTERFACE directives in COPY text are processed by the rules specified for the CALLINTERFACE directive.
You can indicate which calling convention you want by using either the CALLINTERFACE directive or the CALLINT compiler option. Use the directive when you want to use more than one call convention for the CALL statements in a compilation unit. Use the compiler option when you want to use the same call convention for the entire compilation unit.
If you specify both the CALLINTERFACE directive (with suboptions) and the CALLINT compiler option, the directive overrides the compiler option specification for the statements following the directive within a compilation unit.
If you specify the CALLINTERFACE directive without any suboptions, the CALLINT compiler option specification is in effect.
If you specify only the DESC/NODESC suboption, the calling convention in effect is the convention specified in the CALLINT compiler option. (DESC/NODESC are options only for the CALLINTERFACE directive. They are not available in the CALLINT compiler option.) For example, if the CALLINT compiler option is set to CALLINT SYSTEM, given the following directives:
(Section A) ... >>CALLINTERFACE OPTLINK (Section B) ... >>CALLINTERFACE DESC (Section C)
the following specifications are in effect: