Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Assigning the compilation unit with the ADD-FILE-LINK command and COMOPT SOURCE-ELEMENT

Input from libraries can also be initiated directly - bypassing SYSDTA - with the ADD-FILE-LINK command. The standard link name SRCLIB must be used in this case. The general format of the ADD-FILE-LINK command for the input of compilation units from libraries is shown below:

/ADD-FILE-LINK [LINK-NAME=]SRCLIB,[FILE-NAME=]libname

Example 4-3

Input from a PLAM library

/ADD-FILE-LINK SRCLIB,PLAM.LIB ——————————————————————————(1) 
/START-PROGRAM $COBOL2000 ———————————————————————————————(2) 
COMOPT SOURCE-ELEMENT=EXAMP3 ————————————————————————————(3) 
COMOPT SOURCE-VERSION=V001 ——————————————————————————————(4) 
END —————————————————————————————————————————————————————(5)

(1)

The SDF command (in positional operand form) assigns the PLAM library PLAM.LIB and links it with the standard link name SRCLIB.

(2)

Invocation of the compiler.

(3)

The compilation unit to be compiled is stored under the element name EXAMP3 in the PLAM library assigned with the ADD-FILE-LINK command.

(4)

The PLAM.LIB library contains several versions of the element named EXAMP3. In this case, the version designated as V001 is referenced.

(5)

The input of options is terminated, and the compiler begins the compilation run.