TSO-ISPF JCL COBOL VSAM DB2 CICS IMS-DB Tools Articles Forum Quiz Interview Q&A

JCL - Compiling Process


The below example shows the general format of compile JCL used to compile a program.

//jobname  JOB  acctno,name,MSGCLASS=1                ---> The JOB statement indicates the beginning of a job..
//stepname EXEC PGM=IGYCRCTL,PARM=(options)           ---> The EXEC statement specifies that the Enterprise COBOL compiler (IGYCRCTL) is to be invoked.
//STEPLIB  DD   DSNAME=IGY.V4R2M0.SIGYCOMP,DISP=SHR   ---> This DD statement defines the data set where the Enterprise COBOL compiler resides.
//SYSUT1   DD   UNIT=SYSDA,SPACE=(subparms)           ---> The SYSUT DD statements define the utility data sets that the compiler will use to process the source program.
//SYSUT2   DD   UNIT=SYSDA,SPACE=(subparms)                All SYSUT files must be on direct-access storage devices.
//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                              ---> 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.
//SYSLIN   DD   DSNAME=MYPROG,UNIT=SYSDA,             ---> The SYSLIN DD statement defines the data set that receives output from the OBJECT option (the object module).
//              DISP=(MOD,PASS),SPACE=(subparms)
//SYSIN    DD   DSNAME=dsname,UNIT=device,
                VOLUME=(subparms),DISP=SHRCopy code
//*

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.

  • Sources files

  • Object files

  • Listings

  • ADATA files

  • Debug files

  • Executable modules

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


Example:

The following example shows a few possibilities for adapting the basic JCL.

//JOB1     JOB                                      ---> JOB1 is the name of the job.
//STEP1    EXEC PGM=IGYCRCTL,PARM='OBJECT'          ---> STEP1 is the name of the sole job step in the job.
//STEPLIB  DD   DSNAME=IGY.V4R2M0.SIGYCOMP,DISP=SHR      The EXEC statement also specifies that the generated object code
//SYSUT1   DD   UNIT=SYSDA,SPACE=(CYL,(1,1))             should be placed on disk or tape (to be used as input to the link step).
//SYSUT2   DD   UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT3   DD   UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT4   DD   UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT5   DD   UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT6   DD   UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT7   DD   UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSPRINT DD   SYSOUT=A
//SYSLIN   DD   DSNAME=MYPROG,UNIT=SYSDA,
//              DISP=(MOD,PASS),SPACE=(TRK,(3,3))
//SYSIN    DD   *                                   ---> The asterisk indicates that the input data set follows in the input stream.
000100 IDENTIFICATION DIVISION.
000200 PROGRAM ID. MYPROGRM
. . .
/*                                                  ---> The delimiter statement /* separates data from subsequent control statements in the input stream.


If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal