JOB
EXEC
DD
Let see format of job statement below,
//Job_name JOB [accounting information] [,programmer name] [,USER=user-id] [,PASSWORD=password] [,NOTIFY=user-id] [,CLASS=class] [,MSGCLASS=class] [,MSGLEVEL=(stmt,msg)] [,TIME=(mins,secs)] |
Example:
//JOBNAME1 JOB (*),"ibmmainframer",CLASS=C,PRTY=10,NOTIFY=&SYSUID, // MSGCLASS=X,MSGLEVEL=(1,1),TYPRUN=SCAN, // TIME=(3,0),REGION=10K |
Here, JOB statement is getting extended beyond the 70th position in a line,so we continue in the next line which should start with "//" followed by one or more spaces.
Format of an EXEC statement is as follows:
//stepname EXEC PGM=program-name [,PARM=information] [,COND=([(code,operator,step)][,EVEN/ONLY]) |
Example:
Following is a simple example of JCL script along with JOB and EXEC statements:
//JOBNAME2 JOB 'ibmmainframer',CLASS=C,MSGCLASS=X,REGION=8K, // NOTIFY=&SYSUID //* //STEP001 EXEC PGM=MYCOBOL,PARAM=CUST1000, // ACCT=(XXXX),REGION=8K,ADDRSPC=REAL,TIME=1440 |
DD statement for DASD data sets
//DDNAME DD DSNAME=data-set-name, // DISP=(status,normaldisp,abnormal-disp) // [,UNIT=unit] // [,VOL=SER=vol-ser] // [,SPACE=unit,(primary,secondary,dir)] // [,DCB=(option,option)] |
DD statement for In-stream data sets
//DDNAME DD * // [, DLM=XX] |
DD statement for SYSOUT data sets
//DDNAME DD SYSOUT=* |
Example:
Following is an example, which makes use of DD statements along with various parameters explained above:
//JOBNAME3 JOB 'ibmmainframer',CLASS=C,MSGCLASS=X,REGION=8K, // NOTIFY=&SYSUID //* //STEP010 EXEC PGM=ICETOOL,ADDRSPC=REAL //* //INPUT1 DD DSN=userid.SORT.INPUT1,DISP=SHR //INPUT2 DD DSN=userid.SORT.INPUT2,DISP=SHR,UNIT=SYSDA, // VOL=SER=(1243,1244) //OUTPUT1 DD DSN=userid.SAMPLE.OUTPUT1,DISP=(,CATLG,DELETE), // RECFM=FB,LRECL=80,SPACE=(CYL,(5,2)) //OUTPUT2 DD SYSOUT=* |
In next chapter, We will discuss about each JCL statements and it's parameters in detail...
If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!