CALLINTERFACE
The CALLINTERFACE directive specifies the interface convention for CALL and SET statements. The convention specified stays in effect until another CALLINTERFACE directive is encountered in the source.
- DLL
- Specifies that the interface convention for subsequent CALL statements is a call to a DLL, and that subsequent SET function-pointer and procedure-pointer statements are treated as if the DLL compiler option was in effect.
- DYNAMIC
- Specifies that the interface convention for subsequent CALL literal statements and subsequent SET function-pointer and procedure-pointer statements is dynamic (as if the DYNAM compiler option was in effect).
- STATIC
- Specifies that the interface convention for subsequent CALL statements and subsequent SET function pointer and procedure pointer statements is static (as if the NODLL and NODYNAM compiler options were in effect).
If the >>CALLINTERFACE directive has no suboptions, the interface convention for subsequent CALL and SET statements is determined by the setting of the DLL and DYNAM compiler options.
The >>CALLINTERFACE directive has no effect on the CANCEL statement.
The >>CALLINTERFACE directive can only appear in the procedure division.
The positions of CALL statements relative to the CALLINTERFACE directive are determined 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.
Syntax and general rules
You must specify >>CALLINTERFACE on a line by itself, in Area B.
- Within a COPY or REPLACE statement
- Between the lines of a continued character string
- In the middle of a COBOL statement
The >>CALLINTERFACE specification is limited to the current compilation unit.
The REPLACE statement and REPLACING phrase of the COPY statement do not affect the CALLINTERFACE directive.
Precedence of CALLINTERFACE directive versus DLL and DYNAM compiler options
If you specify both the CALLINTERFACE directive (with suboptions) and the DLL or the DYNAM compiler option, the directive overrides the compiler option in effect and determines the interface to be used for subsequent CALL and SET statements.
If you specify the CALLINTERFACE directive without any suboptions, the DLL or the DYNAM compiler option will determine the interface to use for subsequent CALL and SET statements.