Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

CALL-CONVENTION directive

The CALL-CONVENTION directive controls the handling of program and method names and determines the interface generation in the event of program and method calls.

Format


>>CALL-CONVENTIONCOMPATIBLE
                   | COBOL
                   | ILCS
                   | ILCS-SET-RETURN-CODE
                  }


General rules

  1. If the CALL-CONVENTION directive is specified within a statement, it applies for the first time for the next statement.

    The same CALL-CONVENTION phrase applies for WHEN phrases in EVALUATE and SEARCH statements as for the EVALUATE and SEARCH statements themselves.

  2. If the CALL-CONVENTION directive is not specified, >>CALL-CONVENTION COMPATIBLE is assumed.

  3. The table below shows the effect of the CALL-CONVENTION directive’s operands.

Overview for CALL-CONVENTION



Effective for

Convention

COMPATIBLE

COBOL

ILCS

ILCS-SET-
RETURN-CODE

Program name of external program
(CALL...AS prototype (a))

converted to uppercase

converted to uppercase

converted to uppercase

converted to uppercase

Program name of external program
(CALL otherwise (b), CANCEL, ADDRESS OF PROGRAM)

unchanged

converted to uppercase

unchanged

unchanged

Program name of nested program
(CALL...AS NESTED)

converted to uppercase

converted to uppercase

converted to uppercase

converted to uppercase

Program name of nested program
(CALL otherwise (b), CANCEL)

converted to uppercase

converted to uppercase

- (c)

- (c)

Method name
(INVOKE with object reference (d))

converted to uppercase

converted to uppercase

converted to uppercase

converted to uppercase

Method name
(INVOKE otherwise (e))

unchanged

converted to uppercase

unchanged

unchanged

Set uppermost bit in last parameter

in accordance with option

no

no

no

Register1 transferred to special register RETURN-CODE after return from called register

in accordance with option ACTIVATE-XPG4-RETURNCODE

no

no

no

(a)

Prototype name created from COBOL program without PROTOTYPE phrase and repository information generated by COBOL2000 compiler version > V1.2A

(b)

Without prototype name or prototype name created from COBOL program with PROTOTYPE phrase or repository information generated by COBOL2000 compiler version <= V1.2A

(c)

Call of nested programs only possible with AS NESTED

(d)

Object reference SELF, SUPER or defined as USAGE OBJECT REFERENCE with class nname or ACTIVE-CLASS

(e)

Universal object reference or object reference defined as USAGE OBJECT REFERENCE with interface name