Monday, August 29, 2011

JCL (Job Control Language)

JCL (Job Control Language) is used to DEFINE and CONTROL the JOB to the operating system.

Definition involves definition of the programs need to be executed, the data for the programs and the sequence of programs. CONTROL involves controlling the execution or bypassing of a program in the sequence based on the result of the prior program execution.

JCL statements should have // in column 1 and 2. STAR (‘*‘) in the third column, indicates that the line is a comment line.

Typical OPERATION keywords in JCL are JOB, EXEC and DD.

JCL Statements


JOB. It should be the first statement in the JCL. It indicates accounting information and JOB related information to the system. If the member being submitted contains multiple job cards, then multiple jobs will be submitted. These jobs will run concurrently or one after other based on job name, class and initiator availability.

EXEC. The name of the program or procedure to be executed is coded here. Every EXEC statement in a JOB identifies one step. Maximum of 255 EXEC statements can be coded in a JOB.

DD. Data Descriptor. The dataset details are coded here. Dataset contains the data that need to be processed by the program or data that is produced by the program. Maximum 3273 DD statements can be coded in a step.

Sample JCL

//DEMOJB JOB (ACCOUNTING INFO,,,),
// 'SAMPLEJCL %USERT%',
// CLASS=B,
// MSGCLASS=X,
// REGION=5M,
// NOTIFY=&SYSUID,
// USER=&SYSUID
//STEP1 EXEC IGYWCL,
//PARM.COBOL='LIB,APOST,XREF,MAP,OFFSET'
//COBOL.SYSIN DD DISP=SHR,DSN=ABC.XYZ.COBPRG(FILE004)
//LKED.SYSLMOD DD DISP=SHR,DSN=ABC.XYZ.LOADLIB(FILE004)
//SYSPRINT DD SYSOUT=*


This sample jcl can be used to compile a cobol progam .Here we are compiling progam FILE004 and load would generate in DSN=ABC.XYZ.LOADLIB(FILE004).
IGYWCL utility is used to compile this progam in Step1.
You can check the output of the job in System spool by typing SDSF(system display and spool facility) in TSO/ISPF.
In SDSF you will see the following options
JESMSGLG (JES Message Log)
JESJCL (JES JCL)
JESYSMSG (JES system Message)
SYSPRINT (System Print)

From these 4 options you can have complete information about the job.

jcl_fun

0 comments:

Post a Comment