Example: batch compilation
The following example shows a batch compilation for three
programs (PROG1, PROG2, and PROG3)
and the creation of two program objects using
one invocation of the IGYWCL cataloged procedure.
The following steps occur:
PROG1andPROG2are link-edited together to form one program object that has the namePROG2. The entry point of this program object defaults to the first program in the program object,PROG1.PROG3is link-edited by itself into a program object that has the namePROG3. Because it is the only program in the program object, the entry point is alsoPROG3.
//jobname JOB acctno,name,MSGLEVEL=1
//stepname EXEC IGYWCL
//COBOL.SYSIN DD *
010100 IDENTIFICATION DIVISION.
010200 PROGRAM-ID PROG1.
. . .
019000 END PROGRAM PROG1.
020100 IDENTIFICATION DIVISION.
020200 PROGRAM-ID PROG2.
. . .
029000 END PROGRAM PROG2.
CBL NAME
030100 IDENTIFICATION DIVISION.
030200 PROGRAM-ID PROG3.
. . .
039000 END PROGRAM PROG3.
/*
//LKED.SYSLMOD DD DSN=&&GOSET (1)
/*
//P2 EXEC PGM=PROG2
//STEPLIB DD DSN=&&GOSET,DISP=(SHR,PASS) (2)
. . . (3)
/*
//P3 EXEC PGM=PROG3
//STEPLIB DD DSN=&&GOSET,DISP=(SHR,PASS) (2)
. . . (4)
/*
//
- (1)
- The data-set name for the
LKEDstepSYSLMODis changed to the temporary name&&GOSET, without any member name. - (2)
- The temporary data set
&&GOSETis used as theSTEPLIBfor steps P2 and P3 to run the compiled programs. If the Language Environment® library does not reside in shared storage, you must also add the library data set as aDDstatement forSTEPLIB. - (3)
- Other
DDstatements and input that are required to runPROG1andPROG2must be added. - (4)
- Other
DDstatements and input that are required to runPROG3must be added.
Related references
Language Environment Programming Guide (IBM®-supplied cataloged procedures)
Language Environment Programming Guide (IBM®-supplied cataloged procedures)