Several compiler-directing statements and one compiler directive help you to direct the compilation of your program.
These are the compiler-directing statements and directive:
>>CALLINTERFACE can be used only in the PROCEDURE DIVISION.
The syntax and usage of the >>CALLINTERFACE directive are similar to that of the CALLINT compiler option. Exceptions are:
If you specify >>CALLINT with no suboptions, the call convention used is determined by the CALLINT compiler option.
For example, if PROG1 is a COBOL program compiled with the ENTRYINT(OPTLINK) option, you could use the >>CALLINT OPTLINK directive to change the interface only for the PROG1 call:
>>CALLINT OPTLINK DESC CALL “PROG1” USING PARM1 PARM2. >>CALLINT CALL “PROG2” USING PARM1.
The >>CALLINT directive can be specified anywhere that a COBOL procedure statement can be specified. For example, this is valid syntax:
MOVE 3 TO >>CALLINTERFACE SYSTEM RETURN-CODE.
The effect of >>CALLINT is limited to the current program. A nested program or a program compiled in the same batch inherits the calling convention specified with the CALLINT compiler option, but not a convention specified with the >>CALLINT compiler directive.
If you are writing a routine that is to be called with >>CALLINT SYSTEM DESCRIPTOR, this is the argument-passing mechanism:

This compiler-directing statement places prewritten text into a COBOL program. You must specify a text-name (the name of a copybook) that contains the prewritten text; for example, COPY my-text. You can qualify text-name with a library-name; for example, COPY my-text of inventory-lib. If text-name is not qualified, a library-name of SYSLIB is assumed. The following affects library-name and text-name:
library-name
If you specify library-name as a literal, the content of the literal is treated as the actual path. If you specify library-name as a user-defined word, the name is used as an environment variable and the value of the environment variable is used for the path to locate the copybook. To specify multiple path names, delimit them with a semicolon (;).
If you do not specify library-name, the path used is as described under text-name.
text-name
If you specify text-name as a user-defined word, processing depends on whether the environment variable that corresponds to text-name is set. If the environment variable is set, the value of the environment variable is used as the file-name, and possibly the path name, for the copybook.
A text-name is treated as an absolute path if all three of these conditions are met:
For example, these are treated as absolute paths:
COPY “\mycpylib\mytext.cpy” or COPY “d:\mycpylib\mytext.cpy”
If the environment variable that corresponds to text-name is not set, the search for the copybook uses the following names:
For example, COPY MyCopy searches in the following order:
-I option
For other cases (when neither a library-name nor text-name indicates the path), the search path is dependent on the -I option.
To have COPY A be equivalent to COPY A OF MYLIB, specify -I%MYLIB%.
Based on the above rules, COPY “\X\Y” will be searched in the root directory, and COPY “X\Y” will be searched in the current directory.
COPY A OF SYSLIB is equivalent to COPY A. The -I option does not affect COPY statements with explicit library-name qualifications besides those with the library name of SYSLIB.
If both library-name and text-name are specified, the compiler inserts a path separator (\) between the two values if library-name does not end in a \. For example, COPY MYCOPY OF MYLIB with the settings of:
SET MYCOPY=MYPDS(MYMEMBER) SET MYLIB=MYFILE
results in MYFILE\MYPDS(MYMEMBER).
related tasks
Changing the header of a source listing
Compiling from the command line
Specifying compiler options with the PROCESS (CBL) statement
related references
cob2 options
Call interface conventions
CALLINTERFACE directive
(COBOL for Windows Language Reference)
CBL (PROCESS) statement
(COBOL for Windows Language Reference)
*CONTROL (*CBL) statement
(COBOL for Windows Language Reference)
COPY statement
(COBOL for Windows Language Reference)