Sie sind auf Seite 1von 3

COMPILE JCL AND RUN JCL

COMPILE JCL FOR COBOL

STEP1 - COMPILING COBOL PROGRAM

//jobname JOB (acctno),name,MSGCLASS=1 (1)


//stepname EXEC PGM=IGYCRCTL,PARM=(options) (2)
//STEPLIB DD DSNAME=SYS1.COB2COMP,DISP=SHR (3)
//SYSLIN DD DSNAME=&SRCEIN,UNIT=SYSDA, (4) <-- OBJECT
MODULE O/P
// DISP=(MOD,PASS),SPACE=(subparms)
//SYSUT1 DD UNIT=SYSDA,SPACE=(subparms) (5)
//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=* (6)
//SYSIN DD DSNAME=dsname,UNIT=device, (7) <---
ATTENTION , HERE WE GIVE SOURCE PROGRAM
VOLUME=(subparms),DISP=SHR

(1) This step indicates the starting of job.

(2) This step specifies compiler IGYCRCTL is to be invoked.

(3) This DD statement defines the data set where compiler resides.

(4) The SYSLIN DD statement defines the data set (the object module)
will be passed to LINKEDIT step

(5) The SYSUT DD statements define the data sets that the compiler will
use to process the source program.
All SYSUT files must be on direct-access storage devices.

(6) The SYSPRINT DD statement defines the data set that receives
output.

(7) The SYSIN DD statement defines the data set to be used as input to
the job step (source code).

STEP2 - LINK EDIT

//LKED EXEC PGM=IEWL,REGION=1024K,PARM=(options) (1)


//SYSPRINT DD SYSOUT=A (2)
//SYSLIB DD DSN=SYS1.COB2LIB,DISP=SHR (3)
// DD DSN=SYS1.COB2COMP,DISP=SHR
//SYSLMOD DD DSN=MYDOC.MYPROG.BLM(TESTTEMP), (4) <---
LOAD MODULE o/p
// DISP=SHR
//SYSUT1 DD UNIT=SYSALLDA,DCB=BLKSIZE=1024, (5)
// SPACE=(CYL,(1,1))
//SYSTERM DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DSN=&LOADSET,DISP=(OLD,DELETE) (6) <--
OBJECT MODULE i/p
//SYSIN DD DUMMY

(1) This step specifies IEWL will be invoked

(2) The SYSPRINT DD statement defines the data set that receives
output.

(3) This step specifies system datasets

(4) SYSLMOD DD statement defines the dataset , where load module to be


stored

(5) to process object module, IEWL will use these units

(6) SYSLIN DD statement defines the dataset, we will give OBJECT MODULE
here as an input to IEWL

---------------------------------------------------------
compiler options
---------------------------------------------------------

Some of IMPORTANT compiler option , when compiling COBOL program

1. QUOTE/APOST
Default - QUOTE

If we used QUOTE, figurative constant [ALL] QUOTE or [ALL] QUOTES to


represent quotation mark (")
If we used APOST, figurative constant [ALL] QUOTE or [ALL] QUOTES to
represent one or more apostrophe (') characters

2. NUMBER/NONUMBER
Default- NONUMBER

If we used NUMBER, line numbers in source code will be displayes in


error messages and listings
If we used NONUMBER, line numbers in source code ignored by
compiler, and it generates sequence
number for that source
3. LIST/NOLIST
Default - NOLIST

LIST, produce listing of assembler-language expansion of program (is


used to SOC07,SOC04 solving)
NOLIST, it wont produce compiler listing

4. MAP/NOMAP
Default - NOMAP

MAP, to produce listing items defined in DATA DIVISION.


NOMAP, wont produce listing

RUN JCL

//ASD220X JOB (03SES,SSEA),'RUNJCL',CLASS=S,MSGCLASS=T,


// NOTIFY=&SYSUID
//STEP1 EXEC PGM=TESTTEMP <- LOAD MODULE name
//STEPLIB DD DSN=MYLIB.TEST.BLM,DISP=SHR <- Data set where LOAD
MODULE resides
//SYSIN DD * <- Data passing to that
program (optional)
0000002222
/*
//SYSOUT DD SYSOUT=*

Das könnte Ihnen auch gefallen