Job Control Language (JCL)

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/4

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

5 Terms

1
New cards

JCL

Is used to submit jobs to the system. Job is one unit of work. JCL consists of statements and their parameters. There are three types of statements: JOB (specifies the information of the job such as jobname, programmer name and programmerid), EXEC (specifies the program/procedure to use), DD (specifies the files to use in the job) and 2 types of parameters: positional (should be coded in specified order and position eg: accounting info should be coded after job keyword if not JCL error will come), keyword (can appear in any order)

JCL is useful to run the Batch processes.

2
New cards

JCL syntax

the record length should be 80 to write a JCL code: lrecl : 80, should be in upper case (caps on),

first 2 characters on every line is an identifier //,

name of the job: 8 characters it should be same as the name of the pds member,

operand: JOB/EXEC/DD

Accounting info:

other parameters like programmer name

//NAMEFIELD OPERAND PARAMETERS

comment: //* writing comment in the same line /*comment

end jcl : /*

3
New cards

Job Statement

Also known as job card.

line identifier //

name of the job: sortjob - 8characters max, can be alphanumeric, first character should never be a number

JOB operand

accounting info: refers to the person or group to which the CPU time is owned. System specific. not mandatory. used to uniquely identify a user can be emp id or name of dept. multiple (1234, ‘HR’). To skip this parameter we can give ,

programmer name: not mandatory

keyword parameter - can come in any order:

Class= can be A to Z or 0 to 9. every class defines a certain function. jobs similar in some aspect are grouped together in one class For eg: class P is for print. class=Z, class=1

priority= PRTY: 0 to 15. 15 is the highest and 1 is the least.

notify= which person to notify when job completes? - our ID. can also give &sysuid (person who submits the job will get notified)

message class: MSGCLASS= a to z or 0 to 9. specifies the o/p destination for the job messages. P - print the output. A- could mean fax the job output, D - could mean email the output

message level: MSGLEVEL=(Statement, Msg) Specifies the type of messages to be written to the o/p. message level can be 0,1,2, message can be 0, 1

Statement- 0, job statements only

1, JCL along with symbolic parameters expanded

2, JCL only

MSG- 0, messages written only on abnormal termination

1, messages written irrespective or normal/abnormal termination

Type run: TYPRUN: scan(only scan the JCL for syntax errors and don’t run) or hold(hold the job don’t execute it can be executed if required )

Time: max time the job can execute TIME=(50,00) 50 minutes

region: specifies the amount of address space that will be accolated to the job execution. nK(kilobyte) or nM(megabyte) region=5K

When a parameter is omitted it takes up the default system value which was defined by the system administrator.

4
New cards

exec statement

Used to invoke the pgm/proc that we want to execute

Tells system what pgm/proc to execute.

One JCl can have multiple EXEC statements

syntax: //stepname EXEC parameters

stepname - 1 to 8 characters, coded from column 3. First character must be alphabetic or nation character ($ , # , @)

positional parameters used:
PGM - it refers to the program name to be executed in the job step

PROC - it refers tot he procedure name to be executed in the job step

a procedure refers to a set of JCL statements that are stored in a library and retrieved by its name.

a procedure may contain one or more EXEC statements.

Keyword parameters:

PARM: used to pass values to the pgm being executed

ACCT: specifies the accounting info of the job step. ACCT=(userid)

TIME: MAximum time allocated for the step execution. TIME=(mm,ss) of TIME=ss

region: Specifies the amount of address space to be allocated for the job execution. REGION = nK | nM

When parameters are omitted default is used

5
New cards

DD statements

DD - Dataset definition

Define all the datasets to be used in the JCL.

Syntax: //DDname DD parameter

DDname must be 1-8 characters long, coded from column 3, first char must be alphabetic or national char(@,#,$)

Positional Parameters:

‘*’ : * begins an in-stream data set

Dummy: used for testing pf a JCL. Tells the system to not use any i/p/o/p for this DD statement

Data: In-stream dataset containing statements, which begin with //

Keyword parameters:

DSN: Dataset Name (DSN) is used to give the name of the Dataset. DSN= PHYSICAL Dataset name

DISP: Disposition describes the status of the dataset, what to do with the dataset on normal end of the job and what to do with the dataset on the abnormal end of the job.

DISP=(status, normal end disposition, abnormal end - disposition)

status: NEW- dataset will be created by the DD statement

OLD- dataset already exists, existing data will be overwritten and the job step will have exclusive access until completion of job set

SHR - dataset already exists and will be read, multiple jobs can access it at the same time

MOD - dataset already exists, if not then new dataset will be created. Data will be added at the bottom of the existing data.

normal end - CATLG, UNCATLG, DELETE, KEEP, PASS

abnormal end - CATLG, UNCATLG, DELETE, KEEP

CATLG- dataset is retained with an entry in the system catalog

UNCATLG- dataset is retained but the system catalog entry is removed.

KEEP- Dataset is retained without changing any of the catalog entries

DELETE- dataset is deleted from user and system catalog.

PASS- used for normal end only. this is used when the dataset is to be passed and processed by the next job step in a JCL

Default value: DISP=(NEW,DELETE,DELETE)

DCB: Data control Block (DCB) specifies the values for creating a new dataset

It contains various parameters:

LRECL: record length of the dataset

RECFM: record format of the dataset such as FB, U,VB

BLKSIZE: Blocksize of the dataset

DSORG: Dataset organization

Space: Specifies the space required for the dataset.

SPACE=(spaceunits, (primary, secondary, directory-blocks),RLSE)

UNIT: specifies what type of storage to use for the dataset

UNIT=DASD | SYSDA

DASD will store the dataset in Direct access storage device which is like a tape storage

SYSDA will store it in next available disk storage type

VOL: specifies the volume number on the device where the dataset needs to be stored. VOL=SER=(v1,v2). vi,v2 are volume serial numbers

SYSOUT: specifies the o/p destination based on the class. SYSOUT = class, where class is A then o/p is printer. * then o/p goes to the same destination as that of the MSGCLASS.