Wednesday, April 1, 2009

Job Card Parameters (JCL)

JOB CARD PARAMETERS:

Accounting information: It is appositional parameter used to identify the account number which will be charged for utilizing CPU time by the job on mainframe.

It can be of 1 to 143 characters long

 

Syntax: account number

                ‘Account number, additional info’

                ‘Account number’ in case of special characters

 

Programmer name: It is appositional parameter used to specify the name of programmer who submits the job.

It can be of 1 to 20 characters long

 

Syntax:  name

               ‘RANADE D’

 

CLASS:  It is a key word parameter used to assign a class to the job. it can be a to z or 0 to 9

It is installation dependent.

Syntax: class = a 

        

NOTIFY: it is keyword parameter used to specify the user id to which the status of job has to be notified.

Syntax NOTIFY=USERID

             NOTIFY=&SYSUID (The login USERID)

 

MSGCLASS: It is a keyword parameter used to specify how the JCL and output messages should be handled. It can be A to Z and 0 to 9.it is installation dependent.

Syntax: MSGCLASS=A

               MSGCLASS=9

 

 MSGLEVEL: It is a keyword parameter used to specify how much of the JCL and output messages should be printed.

Syntax: MSGLEVEL = (statements, messages)

 The value of statements can be 0, 1 and 2

0 = print only job card

1=print JCL and procedure statements

2=print only JCL messages

The value of messages can be 0, 1

0=print O/P messages only if job abends

1=print O/P messages regardless of job outcome

 

REGION: It is a key word parameter used to specify the amount of memory that the job can utilize for execution.

Syntax: REGION=1024K or 1024M

If the job utilizes more the memory specified in job card the job will be terminated abnormally.

We can specify the region parameter in exec statements also. In that case region will be limited to that particular execution statement only

   Ex: //STEP1 EXEC PGM=PGM1, REGION=1024K

If we specify the region parameter in both job card and execution statement the value in job card overrides the value in EXEC statements.

   Ex: //MTPLH01A JOB NOTIFY=MTLH01, REGION=1024K

     //STEP1 EXEC PGM=ADD, REGION=24K

     //STEP2 EXEC PGM=PGM2, REGION=34K

Step1 and step2 will be allocated 1024KB of memory

 

TIME: It is a key word parameter used to limit the time that the job can utilize.

Syntax: TIME = (M, SEC) M= 1 to 1439 and SEC= 1 to 59

If TIME= (M,) hen SEC =0

If TIME = (, SEC) then M=0

If the job utilizes more time than specified in job card the job will be terminated abnormally.

We can specify the TIME parameter in exec statements also. In that case time will be limited to that particular execution statement only.

Ex: //STEP1 EXEC PGM=PGM1, TIME= (1, 20)

If we specify the TIME parameter in both job card and execution statement the value in execution statement overrides the value in job statement.

 

Ex: //MTPLH01A JOB NOTIFY=MTLH01, TIME= (2, 40)

     //STEP1 EXEC PGM=ADD, TIME= (1, 20)

     //STEP2 EXEC PGM=PGM2, TIME= (1, 20)

Step1 will be allocated                 1 minute 20 seconds

Step1 will be allocated                 1 minute 20 seconds

 

TYPRUN: It is a keyword parameter used to control the type of execution.

Syntax TYPRUN=HOLD

It checks for syntax errors and the job will be held in the input queue .it will be executed when the user release the job.

TYPRUN=SCAN

It only checks for syntax errors.

TYPRUN=COPY

It copies the source content to the output device specified in message class parameter.

 

RESTART: it is a keyword parameter used to start the job from a step specified in the parameter other than the first step.

Syntax RESTART=STEP3

 

EXEC STATEMENT PARAMETERS:

 

We can write maximum of 255 steps.

PGM: it is a key word parameter used to specify the program name that is to be executed.

Syntax PGM=ADD

 

PARM: it is a key word parameter used to pass the information to program that is being executed in the step.

Syntax PARM= ’PRINT’

             PARM=’PRINT, PASS’

 

 

COND:  it is a key word parameter used to control the execution of subsequent steps.

 

Condition parameter on job card:

Syntax: COND= (COMPARISION CODE, CONDITON)

When executing each and every step the comparison code will be compared against the return code of prior step

Comparison code: this is a number from 0 t0 4095

Condition: GE, GT, LE, LT, NE, EQ

The first step will be executed normally. The remaining steps will be executed based on the condition.

Ex COND= (4, EQ)

4 = return code of previous step

If the condition is true the execution of second step will be skipped else it will be executed

 

Condition parameter on job card:

Syntax: COND= (COMPARISION CODE, CONDITON, STEPNAME)

STEPNAME = name of the step whose condition code is to be compared.

The comparison code will be compared against the return code of step which is mentioned

Ex:  COND= (4, EQ, STEP4)

4 = return code of STEP4

If the condition code is true the step on which the condition is coded will be skipped else it will be executed.

 

If condition is coded   both the statements job card condition overrides the condition code of step.

 

 

 

 

 

 

 

DD STATEMENT PARAMETERS:

We can specify maximum of 3273 DD statements

DISP: it is a key word parameter that specifies the current status of the dataset and what steps should be taken if the job terminates abnormally or normally

Syntax: DISP= (STATUS, NORMAL DISP, ABNORMAL DISP)

STATUS

 

NEW, OLD, SHR, MOD

NEW : The dataset is new

OLD: the dataset is old and the dataset will be used by the job exclusively

SHR: the dataset is old and the dataset will be used by the other jobs also at the same time

MOD: if he dataset is existing the data will be appended else it will be treated as new

 

NORMAL DISP

CATLG, UNCATLG, KEEP, PASS, DELETE

CATLG: After normal termination the dataset will be cataloged

UNCATLG: After normal termination the dataset will be uncataloged

DELETE: after normal termination the dataset will be deleted

KEEP: after normal termination the dataset will be kept

PASS: after normal termination the dataset will be passed to subsequent step

 

ABNORMAL DISP:

CATLG, UNCATLG, KEEP, DELETE

CATLG: After abnormal termination the dataset will be cataloged

UNCATLG: After abnormal termination the dataset will be uncataloged

DELETE: after abnormal termination the dataset will be deleted

KEEP: after abnormal termination the dataset will be kept

 

SPACE: it is keyword parameter used to allocate the memory for the dataset.

Syntax: SPACE= (UNIT, (P, S, D), RLSE)

UNIT=TRKS, CYL, number of blocks

P=primary allocation

S=secondary allocation

D=number of directory blocks in case of PDS otherwise it is 0

RLSE: If there is any unused space it will be released.

 

DSN OR DSNAME: it is a keyword parameter used to specify a dataset name that the program is using

It can be PS or PDS.

Ex: DSN=MTPLH01.DINU.PS

Ex: DSN=MTPLH01.DINU.PDS (M1)

 

 

DCB: it is a key word parameter used to specify the characteristics of dataset that is being used.

Syntax: DCB= (LRECL=N, BLKSIZE=M, RECFM=F/V/FB/VB/V)

N can be 1 to 32760 bytes

M can be 18 to 32760 bytes

 

UNIT: it is keyword parameter used to specify the unit name that the dataset is resided on.

Syntax: UNIT=SYSDA or SYSSQ, TAPE

 

VOL=SER= it is key word parameter used to specify the volume serial number in which the dataset is resided or to be created.

Syntax: VOL=SER=USER32

 

SPECIAL DD STATEMENTS:

 

JOBLIB: it is special statement used to specify a PDS library where the load modules that is being executed by all the steps of the job is located

It should always be after job and before execution statement

Syntax:  //JOBLIB DD DSN=MTPLH01.GTP64.PDS, DISP=SHR

 

STEPLIB: it is special statement used to specify a PDS library where the load modules that is being executed by the particular step is located

It should always be after step statement

Syntax:  //STEPLIB DD DSN=MTPLH01.GTP64.PDS, DISP=SHR

 

If both the statements are specified then the STEPLIB overrides the JOBLIB.

 

SYSPRINT: it is a special DD statement used to print the system messages to the output device

Syntax: //SYSPRINT DD SYSOUT=* star refers to the value in message class parameter

              //SYSPRINT DD DSN=A.B.C, DISP=SHR

 

SYSOUT: it is a special DD statement used to print the output messages to the output device

Syntax: //SYSOUT DD SYSOUT=* star refers to the value in message class parameter

              //SYSOUT DD DSN=A.B.C, DISP=SHR

 

SYSIN: it is a special DD statement used to print supply the output to the program that is being executed

Syntax: //SYSIN DD *

               1

               2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

11 comments:

Anonymous said...

Useful for a qucik refresh, reference. Well done!!!

Narayana said...

Sir, Really, HATSOFF to YOU...I fell really great to say that, Iam your student... I really felt PROUD ones I see here..No words to say about ur greatness in SUBJECT of MAINFRAME'S.

Anonymous said...

super sir..
really helpful..
try to continue with all other details in mainframe...

Unknown said...

ya it's superb.
good work

Anonymous said...

how to submit a jcl with password.

Anonymous said...

HI dinesh, This is govinda. How r u. Thank you for supporting all by providing mainframes info.

Anonymous said...

Hi,
This one is very useful for quick reference.


All The Best

Devasena said...

very useful. i had a quick glance in jcl. i could see the parameters that are used in a job card. could u pls let me know abt the minimum essential parameters that are needed 2 run a job?

Anonymous said...

You can link this page to a more details version:

JCL Parameters

Anonymous said...

Thanks for posting this stuff for quick refreshment....
Please keep contributing this kind of useful information for us...

Anonymous said...

Great Job, Thanks.