Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Programming Guide


Writing JCL to compile programs

If the cataloged procedures do not give you the flexibility you need for more complex programs, write your own job control statements. The following example shows the general format of JCL used to compile a program.

//jobname  JOB  acctno,name,MSGCLASS=1                (1)
//stepname EXEC PGM=IGYCRCTL,PARM=(options)           (2)
//STEPLIB  DD   DSNAME=IGY.V4R1M0.SIGYCOMP,DISP=SHR   (3)
//SYSUT1   DD   UNIT=SYSDA,SPACE=(subparms)           (4)
//SYSUT2   DD   UNIT=SYSDA,SPACE=(subparms)
//SYSUT3   DD   UNIT=SYSDA,SPACE=(subparms)
//SYSUT4   DD   UNIT=SYSDA,SPACE=(subparms)
//SYSUT5   DD   UNIT=SYSDA,SPACE=(subparms)
//SYSUT6   DD   UNIT=SYSDA,SPACE=(subparms)
//SYSUT7   DD   UNIT=SYSDA,SPACE=(subparms)
//SYSPRINT DD   SYSOUT=A                              (5)
//SYSLIN   DD   DSNAME=MYPROG,UNIT=SYSDA,             (6)
//              DISP=(MOD,PASS),SPACE=(subparms)
//SYSIN    DD   DSNAME=dsname,UNIT=device,            (7)
                VOLUME=(subparms),DISP=SHR
(1)
The JOB statement indicates the beginning of a job.
(2)
The EXEC statement specifies that the Enterprise COBOL compiler (IGYCRCTL) is to be invoked.
(3)
This DD statement defines the data set where the Enterprise COBOL compiler resides.
(4)
The SYSUT DD statements define the utility data sets that the compiler will use to process the source program. All SYSUT files must be on direct-access storage devices.
(5)
The SYSPRINT DD statement defines the data set that receives output from options such as LIST and MAP. SYSOUT=A is the standard designation for data sets whose destination is the system output device.
(6)
The SYSLIN DD statement defines the data set that receives output from the OBJECT option (the object module).
(7)
The SYSIN DD statement defines the data set to be used as input to the job step (source code).

You can use a mixture of HFS (PATH='hfs-directory-path') and MVS data sets (DSN=traditional-data-set-name) in the compilation DD statements for the following data sets:

However, the compiler utility files (DD statements SYSUTx) and COPY libraries (DD statement SYSLIB) must be MVS data sets.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)