Professional Documents
Culture Documents
State Farm Post-IPEP Manual - JCL Section (Last Updated 07/31/00) 1
State Farm Post-IPEP Manual - JCL Section (Last Updated 07/31/00) 1
Job Control Language consists of several job control statements. These statements are created by
a programmer or by a JCL coder using documentation provided by a programmer. The specific
kinds of information that JCL statements usually provide are:
There are many other types of information that JCL may provide to specify how the job should be
processed, but the minimum requirement is to identify the job, the program to execute in each job
step, and the datasets to be used. There are five basic types of JCL statements:
- JOB Statement
- EXEC Statement
- DD Statement
- NULL Statement
- COMMENT Statement
Before the specific JCL statements are described, let’s review the concept of a job and its job
steps called a job input stream. A job step identifies a single program to be executed and a job is
a collection of related job step
The following is an example of JCL code. In this section, we will look and describe all parts of
this code.
- A JOB Statement
- Job Step(s) marked by EXEC statements
- Dataset descriptions that are described by DD statements and needed for each job
step.
- Name Field
- Operation Field
- Operand Field
- Comments Field
All JCL statements begin with a // in columns 1 and 2. The // identifies a statement as a JCL
statement as opposed to a data statement. The name field begins immediately after the second
slash; while the other fields are separated from each other by one or more blanks. The fields,
except for comments, must be coded in columns 3-71. The comment field can extend through
column 80.
The JCL statement fields must be coded in the order presented above. One or more blanks must
separate each field.
The Name Field identifies, or names, the JCL statement so that other statements or the operating
system can refer to it. The name field is required on the JOB statement. It can be optional for the
EXEC and DD statements, but is usually used. Choose names that are meaningful since they will
be helpful in locating problems later. The following are specifications for JCL statement names:
//ABC12
//$456
//B$JOB1
Operation Field
The Operation Field specifies the type of control statement; JOB, EXEC, or DD. In this case it is
JOB.
//JOB12 JOB
//MYRVN JOB
Operand Field
There are many kinds of information that can be provided to the operating system with operands
on the job statement. These operands are also referred to as parameters and are either positional
or keyword.
Keyword Parameters are “positionally” independent with respect to other keyword parameters;
that is, they may be coded in any order. The only restriction is that keyword parameters must
be coded after positional Parameters. There are many optional keyword parameters, we will
discuss the most commonly used ones:
If you have any questions about this section, please see your mentor before continuing.
The JOB statement identifies a job, (a batch unit of work), to MVS. The job statement names the
job and supplies the necessary information to indicate which resources the job will use. A Job is
considered to consist of multiple job steps, each step is made up of an EXEC statement and one
or more DD statements. A Job is all the JCL statements between a Job statement and the next Job
statement or null (*//*) statement.
Jobname – the name of the job consisting of 1-8 alphanumeric or national characters ($, #, @).
The job name starts in column three on the Job Statement and must be present.
** It is recommended that the first 4 characters of a jobname be your 4-character primary logon.
In the example above, the Jobname is FXCHN004. The ‘FXCH’ is Connie Huston’s 4-character
primary logon.
Accounting Information – this is no longer used in the Life Company so a comma is coded as the
first positional parameter so that the job will not abend.
Programmer’s Name – the programmer’s name is a positional parameter that follows the
accounting information on the Job Statement. Life Company includes some output routing
information in the programmer name parameter. The routing information is included to aid the
distribution of written output to each analyst’s desk.
** The example above shows that programmer’s name is ‘HUSTON’ she is in unit FX mail drop
two on J4.
Keyword Parameters – A variety of keyword parameters can be specified on the Job Statement,
these are:
** The example above shows all four of the most commonly used keyword parameters listed
above.
REGION – Use this operand to specify the amount of virtual storage space allocated to a job.
NOTIFY – Use this operand to identify who the job response messages should go to.
MSGCLASS – Use this to identify the route of output, JCL statements, and system messages.
The most commonly used message classes are 2($AVRS) and A(Print).
The Job Parm statement is used only in the Life Company because jobs are run in the JES2
system.
JOBPARM – Use this operand to identify the system you are running the job on and where the
output should be routed.
ACTIVITY:
1. What are the 3 statements used in JCL?
2. What is the positional parameter used in Life Company?
3. Edit a new member in your ISPF.JCL name NG157. Code the job statement and job parm
statement for this job.
4. Check with your mentor to make sure your JCL is correct because you will be adding to this
member at a later date.
The Execute statement identifies a job step to execute in MVS. This statement follows the JOB
statement and names a program to be executed. Programs are stored in program libraries, and
when the EXEC statement references them, the programs will be retrieved by the operating
system. Some programs have optional parameters that can be listed on the EXEC statement.
A job can have a maximum of 255 job steps. This maximum includes all steps in any procedures
the EXEC statements call.
Stepname – the name of the job step, consisting of 1-8 alphanumeric or national characters and
must be followed by at least one blank . The step name starts in column 3 on the EXEC
statement, but does not have to be present.
Exec – the term EXEC follows the stepname and identifies the JCL statement as an EXEC
statement.
** The example above lets the JCL know this is an EXEC step by putting EXEC between
the stepname and Program name.
Procname/Program – the name of the catalogued procedure or program to be invoked by the job
step. The parameter is the only positional parameter in the EXEC statement.
Keyword Parameters – A variety of keyword parameters can be specified on the EXEC statement,
these are:
The following keyword parameters are most commonly used in the EXEC statement:
PARM= The PARM parameter is used to pass variable information to the program being
executed in a job step. The processing program must contain instructions to
retrieve the information and take advantage of it. PARM values are program-
specific; that is, each program expects a different parm or possibly no parm at
all. The PARM= keyword is continued onto a second statement by enclosing
the value it specifies in parenthesis, and enclosing any subexpressions within
apostrophes followed by a comma. Begin the continued PARM value
anywhere in columns 4 through 16 on the next
RD= The RD (Restart Definition) parameter is used to tell MVS that it can
automatically restart a job step if it fails, or prevent the usage of checkpoint
restart facilities in the program or on the DD statement (via the CHKPT JCL
keyword).
Syntax:
RD{procstepname}={R }{RNC }{NR }{NC }
Where: "R" indicates automatic step restart should be done, "RNC" indicates
that automatic step restart should be done, but checkpoint restarts should be
deferred, "NR" indicates that automatic step restart can't happen, but deferred
checkpoint restart is allowed, and "NC” indicates that automatic and deferred
restart in any form can't happen
REGION= This is used just like the operand for the job statement, and specifies the
regions size for the program you are executing within this job step.
Ex. //TEST EXEC PGM=TBIGRUN,REGION=5000K
COND= The COND parameter is used to specify the return code tests that MVS will
perform to see if a job step will be executed or not. Before a job step containing
a COND= parameter is executed, MVS performs the
COND parameter test(s) specified against the return codes from all prior job
steps or the steps named on the COND= parameter. If none of these tests is
satisfied, the system executes the job step; if any test is satisfied, the system
skips the job step on which the COND= parameter is coded. Tests are made
against return code values for the current execution of the job. A step skipped
because of an EXEC statement COND parameter will not produce a return
code, because it will not be executed.
Note that skipping a step because of a return code test is not the same as
abending the step. The system abends a step following an error that is serious
enough to keep successful execution from occurring. Skipping of a step just
keeps it from being executed.
Please check with your mentor to make sure that your EXEC statement is correct because you will
be adding additional steps to it in the following sections.
DDNAME – made up of 1-8 alphanumeric or national characters. The ddname starts in column 3
on the DD statement and is required on DD statements that are not concatenated to another DD
statement.
** The example above uses the following keyword parameters: TAPE, UNIT, and VOL.
We will use the DD statement below to show examples of different DD statement options.
DD statements may:
- Give the dataset name FXCH.TERMIN.D990920.RUS.DATA
- Specify record length, blocking, etc. DCB=(LRECL=19069, RECFM=U)
- Request I/O devices UNIT=3390
- Specify storage allocation SPACE=(TRK,(150,10),RLSE)
We will now discuss some of the most commonly used operand used in the DD statement:
DDNAME
The DDNAME tells the operating system to look at the JCL for that program and find a
DD statement with that DDNAME. The DDNAME has the same rules as all name fields.
DSN or DSNAME
DSNAME is used to identify the data you will be using in your Job step. DSNAME is
abbreviated as DSN and will be used as such in the rest of our examples. The first
character of a DSN must be alphabetic or national.
DISP
The DISP parameter identifies the status of a data set prior to the beginning of the jobstep
and after the jobstep completes. There are three subparameters:
The first subparameter specifies the status at the beginning of the Job Step.
The second subparameter specifies what to do with the file at the end of the step.
The third subparameter specifies what to do with the file if an error occurs.
UNIT
The Unit parameter specifies the type of I/O device to a dataset. Notice that coding
UNIT=group name does not ordinarily identify a specific volume. Rather, it classifies
the I/O device associated with the volume.
VOLUME
When using Volume, the abbreviated version is VOL. VOL has two subparameters, SER
and REF.
Ex:
// UNIT=SYSDA
Defaults to the available systems device available.
// UNIT=TAPE, VOL=SER=012345
Will use any available tape drive and mount volume 012345.
// UNIT=TAPE, VOL=SER=(012345,023456,034567).
Will use any available tape drive and mount the tapes on that drive in this
order.
// UNIT=TAPE, VOL=REF=*.NG081A.
EXPDT=yyyy/ddd
Gives the expiration date for the data set. For MVS/ESA systems only, the yyyy/ddd value is a
four-digit year followed by a three-digit Julian day number; for example, 1996/232 is the two
hundred thirty-second day of year 1996.
RETPD=nnnn
'nnnn' is the number of days after which this data set is
eligible for deletion. 'nnnn' can be any number in the range
0000 through 9999. Leading zeroes can be omitted.
EX:
LABEL=EXPDT=1999003
Specifies the year 1999 and the day 3 to expire this data.
LABEL=RETDT=90
Specifies to keep this dataset for 90 days.
** NOTE: RETPD can be coded with LABEL= or by itself, but EXPDT must be coded
with Labels.
SPACE
The SPACE parameter is used to request a specific amount of disk storage space. This
should be coded only for a disk dataset, not tape datasets. All requests for disk space are
categorized as either primary or secondary allocations. Space can be allocated in
cylinders, tracks, or blocks.
**Note: The abbreviation for cylinder is CYL and track is TRK. CYL allocates space in
cylinders CYL is a convenient unit to select with large datasets. TRK allocates in tracks.
TRK is often used with small datasets where TRK comes closest to fitting the actual
space requirements. Once space is allocated, there is a third subparamter of space is
used. They are: RLSE and CONTIG.
CONTIG – Specifies that the entire primary allocation must be contained within a single
extent.
RLSE – Used to return allocated space that is not needed to a disk volume. When coded,
all unused space is release and becomes available.
SYSOUT
The SYSOUT parameter names the output class to which the printed output will be sent.
If Sysout=* or SYSOUT=$ is coded, this dataset is automatically sent to the same output
class as the MSGCLASS parameter in the job statement. To send output to $AVRS, the
JOB statement should have MSGCLASS=4 and the SYSOUT should have – SYSOUT
DD *. SYSOUT=A or SYSOUT=1 can be requeued to the system printer after browsing
on the 3.8 screen; however, it will take 2-4 hours to be delivered to you.
LRECL – Stands for logical record length. The LRECL subparameter specifies the size
of the record and the program it is processing.
BLKSIZE – Specifies the size of a physical record. A physical record or block consists
of the data that is actually written or read from an I/O device.
RECFM – Stands for record format. RECFM specifies whether logical or physical
records are fixed in length or vary in size. RECFM classifies every dataset into one of
five categories. The five possible logical record values are:
F Fixed length
V Varible length
U Undefined or unspecified (also variable) length
VS (Variable) spanned length
D (Variable) ASCII records (Life Environment data with F,V, or U)
The first four formats F,V,U, and VS are EBCDIC. There are five additional letters to be
coded with RECFM. Each of them will interact with one or more of the above five
values. Again, we will discuss only what is currently used in the Life Environment.
B – The logical records in the dataset is blocked. B should not be coded with U, but it is
allowed with the other four values defined above.
A – The first byte of each record is used as an ANSI carriage control character.
M – The first byte of each record is used as a machine carriage control character.
Some of the most commonly coded RECFM values are listed below:
RECFM=F All logical records are the same size. Each physical record contains
exactly one logical record. The accompanying LRECL and BLKSIZE
values should be the same, so usually only BLKSIZE is coded in the
JCL.
RECFM=FB All logical records are the same size. As many complete logical records
as will fit are place on a block, so RECFM=FB should be accompanied
by a BLKSIZE value which is an integral multiple of the LRECL. The
same results occur when RECFM=BF is coded. The RECFM
subparameter values may be coded in any order.
RECFM=FBA This is the same as coding RECFM=FB, but now the first byte of the
logical record is used for a carriage control.
RECFM=FBMThis is the same as coding RECFM=FB, but now the first byte of the
logical record is used for a machine carriage control.
RECFM=V Both logical and physical records are variable length. The first four
bytes of each logical record contain its length. The LRECL value must
specify the length of the largest possible record in the dataset +4. For
RECFM=V, BLKSIZE=LRECL +4.
RECFM=VB For RECFM=VB, they must be greater than or equal to LRECL +4. The
notion of a true blocking factor is only used with fixed length records; it
does not make sense with variable length records. Hence, BLKSIZE
need not be set to equal 4 plus a multiple of the LRECL.
RECFM=U Undefined records are variable length. However, they do not contain a
field that holds their length. With undefined records each block contains
exactly one logical record, so it is sufficient to code just BLKSIZE and
omit LRECL.
BUFNO
This is a subparameter that specifies the number of buffers to assign to a dataset.
Dependent on the dataset organization, the default values range from 2 to 5.
BUFNO is an important subparameter when processing a sequential data set or
number of PDB libraries.
EX:
// DCB=(BLKSIZE=4000,LRECL=1,RECFM+FBA,DSORG=PS,BUFNO=2)
NULL Statement – This statement may be used to mark the end of a job. It is coded with two
slashes (//) in columns one and 2 with no other characters.
Please do the following activities so that you can become more familiar with the QW Manual.
ACTIVITY 1:
1. Type QW from the command line of any ISPF Panel and press [ENTER]. This will bring up
the QW Main Menu Panel.
4. Select the line IBM0S390 System codes by putting an S next to the appropriate line. Press
[ENTER].
ACTIVITY 2:
6. Use QW (Quick Reference) to determine the meaning of the following error codes(Hint:
Item line):
S637
S0C1
S0CA
S813
SB37
SD37
7. You will see additional error codes on the following page regarding JCL errors.
ACTIVITY 3:
8. Press [F3] until you are at the QW Main Menu.
9. Enter a C on the command line and press [ENTER].
10. Select the Codes category.
11. Find write-ups for codes in Activity 2.
12. This is another way to search for activity codes.
Example 1:
IEF642I JCL Statements
The stepname, STEP#FOUR, is not valid. The maximum length allowed for stepnames
is 8 characters.
The code IEF6421I is in the IBM manual accessed by QW. This error will be listed as a
message.
Example 2:
//LA$JOE JOB 31SPC03090156W,CLASS=V
//STEP6 EXEC PGR=IEFBR14
Example 3:
This message was received because there are blank spaces within the PGM parameter. It
should read PGM=IEFBR14.
The following activities have been designed to specifically help you apply the JCL information
you have read about in this section. Please see your mentor if you have any problems or
questions when doing the exercises.
JCL EXERCISES