Document Sample
jcl Powered By Docstoc
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:

        -   Which programs to execute
        -   The sequence of program execution
        -   The datasets required by programs

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.

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                                     1
                                      Job Input Stream
A series of jobs ready to be submitted to the operating system is referred to as the job input stream,
job stream, or input stream. The discussion of job input stream is related to the three JCL
statements, and the definitions of job and job steps. Each job step contains dataset descriptions
needed for the program to be executed. Each job is made up of the following elements:

         -   A JOB Statement
         -   Job Step(s) marked by EXEC statements
         -   Dataset descriptions that are described by DD statements and needed for each job

 State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                                   2
                             JCL Control Statement Fields
Every control statement is logically divided into different fields. There are four fields or types of

Here is the general format of a JCL statement:


        -   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.

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                                   3
The Name 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:

        -   They may be 1-8 characters long
        -   Characters may be alphanumeric or national (#,@,$)
        -   No special characters may be used
        -   The first character may be alphabetic or national
        -   The first 4 characters should be your 4-digit primary logon
        -   Names must begin in column 3

Valid Examples of Job Names:


Invalid Examples for Job Names:

//+JOB1 – printer character must be alphabetic or national
//EXAMPLE14 – longer than 8 characters
// RUN2 – did not start in column 3

Operation Field

The Operation Field specifies the type of control statement; JOB, EXEC, or DD. In this case it is

Valid examples of a JOB control statement:


Invalid examples of a JOB control statement:

//JOB JOB12 – Job must follow the Job name.
//RUNS#JOB – Must separate job name from 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.

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                                   4
Positional Parameters must be coded in the order shown with a comma separating them. No
blank spaces are allowed between parameters.

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.

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                           5
                                      The JOB Statement

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.

The parts of the Job Statement are:

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.

** The example shows the ‘,’ right after the jobname.

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:

        ADDRSPC=         BYTES=           CARDS=           COND=         GROUP=
        LINES=           MSGLEVEL=        NOTIFY=          PAGES=        PASSWORD=
        PERFORM=         PRTY=            RD=              RESTART=      SECLABEL=
        SCHENV=          TIME=            TYPERUN=         USER=

        Here are the most commonly used Keyword Parameters:

        CLASS=           MSGCLASS=                NOTIFY=           REGION=

** The example above shows all four of the most commonly used keyword parameters listed

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                                  6
Here is the Job Statement’s basic structure:
//Jobname , programmer’s name, keyword1, keyword2, etc.

CLASS – Use this operand to assign a job class to a job.

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

The Job Parm statement is used only in the Life Company because jobs are run in the JES2

JOBPARM – Use this operand to identify the system you are running the job on and where the
output should be routed.

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.

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                               7
                                     The EXEC Statement

 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.

The parts of an EXEC statement are:

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.

        ** NG157P is the stepname in the example above.

Exec – the term EXEC follows the stepname and identifies the JCL statement as an EXEC

        ** 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.

        ** PGM=PNG157 is the program to execute in the example above.

Keyword Parameters – A variety of keyword parameters can be specified on the EXEC statement,
these are:

                ADDRSPC=         CLASS=            DPRTY=            DYNAMNBR=
                PERFORM=         PGM=

        ** TIME=30 is the keyword parameter in the example above.

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

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                                      8
                 JCL statement with a PARM:
                          Example: //JS10 EXEC

         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

                          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

         TIME=            Specifies the amount of time this step is expected to run.
                          Ex: //STEP1 EXEC PGM=DB540A, TIME=15,REGION=100K
                              //STEP2 EXEC PGM=DB540B, TIME=10,REGION=500K

         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.

Here is the EXEC statement basic structure:

//stepname EXEC proc or program, keyword1, keyword2, etc.

Proc (Procedure Name) – Specifies a procedure to be used.
Pgm (Program Name) – Names the program to be executed.

The following are examples of EXEC statements:

 State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                                           9
Add an EXEC statement to your ISPF.JCL NG157 member that executes the program PNG157.

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.

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                            10
                         The Data Definition Statement (DD)
Data Definition (DD) statements define the datasets that are required by the program to be
executed. There must be (at least) one DD statement for each dataset used in the job step;
therefore, the number of DD statements that follow an EXEC statement depend on the dataset
requirements of the program. The order of DD statements within a job step is not usually
significant. The DD statement is the most extensive of the JCL statements.

Up to 1,635 DD statements can be allocated to a single job step.

The three parts of the DD statement are:

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

** The DDNAME in the example above is “INPUT”

Positional Parameters – a variety of positional parameters can be specified on the DD statement,
these are:

         DATA             DUMMY            DYNAM

Keyword Parameters – A variety of keyword parameters can be specified on the DD statement,
there are:

         ACCODE           AMP              AVGREC           BLKSIZE       BURST
         CHARS            CHKPT            CNTL             COPIES        DATA
         DATACLAS         DCB              DDNAME           DEST          DISP
         DLM              DISD             DSNAME           DSNTYPE       DUMMY
         DYNAM            EXPDT            FCB              FILEDATA      FLASH
         FREE             HOLD             KEYLEN           KEYOFF        LABEL
         LIKE             LRECL            MGMTCLAS         MODIFY        OUTLIM
         OUTPUT           PATH             PATHDISP         PATHMODE      PATHOPTS
         PROTECT          QNAME            RECFM            RECORG        REFDD
         RETPD            RLS              SECMODEL         SEGMENT       SPACE
         SPIN             STORCLAS         SUBSYS           SYSOUT        TERM
         UCS              UNIT             VOLUME

** The example above uses the following keyword parameters: TAPE, UNIT, and VOL.

 State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                                 11
Here is the DD statement’s basic structure:

//ddname DD positional parameter,keyword1, keyword2, etc.

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:

     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.

       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.

         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.

         Here are some subparamter descriptions:

         First subparamter options:
         SHR – Allows multiple jobs to access the same data at the same time.
         NEW – When a dataset is first created, it must be OLD or MOD.
         MOD – Can be interpreted as either NEW or OLD. Initially the system assumes that the
         dataset exists and attempts to locate it. If it is not found, MOD is treated as NEW.
         OLD – Used only for this job. Cannot simultaneously access the dataset with another

         Second subparameter option:

 State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                                12
        PASS – Coding PASS makes the dataset available to upcoming steps in the job. An
        entry of the dataset will be put in the pass table.

        Second and Third subparameter options:
        KEEP – Is a default for the second and third subparamters. Coding KEEP creates a
        permanent dataset which exists after a jobstep ends. KEEP will not place an entry into
        the catalog or pass table.
        CATLG – Places an entry of the dataset into the catalog. This entry can be called upon
        in the next steps or in a different job by the dataset name.
        UNCATLG – Will rename the datasets entry from a system catalog. UNCATLG does
        not delete the dataset from disk or tape columns. Basically, it will turn the cataloged
        dataset into a kept dataset. After a dataset or tape is UNCATLG, it can be retrieved.
        Using a unit or VOL parameter, the data can be retrieved. It can be retrieved only if tape
        or disk has not been scratched or cleared.
        DELETE – DELETE is used to remove a dataset (scratch it) from a column. When a
        tape is deleted, it is available to be written over again.

        Here are some Examples of the DISP parameter:

        DISP Value Coded                          Default Values Supplied
        DISP=NEW                                  DISP=(NEW,DELETE,DELETE)
        No DISP parameter coded                   DISP=(NEW,DELETE,DELETE)
        DISP=(,PASS)                              DISP=(NEW,PASS,DELETE)
        DISP=(,KEEP)                              DISP=(NEW,KEEP,KEEP)
        DISP=(OLD,,CATLOG)                        DISP=(OLD,KEEP,CATLG)
        DISP=(MOD,,DELETE)                        DISP=(MOD,KEEP OR DELETE,DELETE)

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                               13
        DISP=(,,CATLOG)           DISP=(NEW,DELETE,CATLOG)

        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.

                Examples of the Unit Operand:
                Group Name                    Usual Meaning
                UNIT=SYSDA                    Any disk drive within a particular group;
                                              SYSDA is often used with temporary or work
                                              datasets; it is unnecessary to code a VOL
                                              parameter with UNIT=SYSDA.
                UNIT=DASD                     Same meaning as UNIT=SYSDA
                UNIT=DISK                     Same meaning as
                                              UNIT=SYSDA;SYSDA,DASD, and DISK can
                                              all be used to identify different groups of disk
                UNIT=TAPE                     Any tape drive.
                UNIT=WORK                     A disk drive used to hold work datasets.

    When using Volume, the abbreviated version is VOL. VOL has two subparameters, SER
    and REF.

        SER: Specifies a single volume or many volumes.
        REF: gives reference to a cataloged dataset passed. It can be used to retrieve
        information from existing catalog or passed datasets.

                //       UNIT=SYSDA
                         Defaults to the available systems device available.

                //       UNIT 3390, VOL=SER=TST004
                         Will use a 3390 disk drive identified as TST004.

                //       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

                //       UNIT=TAPE, VOL=REF=*.NG081A.

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                                14
                          Will use any tape drive available and the tape to mount is referenced in
                          catalog from a previous step. In this case, the step previous within the
                          same job was NG081A.
     LABEL subparameters are EXPDT and RETPD. Both are used regularly in the Life
     Environment to protect or release data. EXPDT or RETPD must be on all newly created
     datasets or they will be lost overnight.

        EXPDT – is coded to a specific date that data will be released.

        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 – is coded to retain the data for a number of days.

        '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.

             Specifies the year 1999 and the day 3 to expire this data.
             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.

     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

        RLSE – Used to return allocated space that is not needed to a disk volume. When coded,
        all unused space is release and becomes available.

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                                       15
             This will allocate one Cylinder.
             This will allocate 30 tracks.
             This is saying that you will use a primary allocation of 10 tracks. If more space
             is needed, the system will allocate one track at a time for the secondary
             allocation. This one additional track will be tried for a maximum of 15 times.
             This means that if all tracks were allocated, the most you would use are 25

     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.

DCB (Data Control Block)
      A DCB parameter will describe the characteristics of the records in a dataset. There are
      many subparameters of the DCB. We will discuss only the commonly used ones within
      the Life Environment. They are: LRECL, BLKSIZE, RECFM, DSORG, BUFNO, and
      OPTCD = B. For information on other subparameters, look in QW(Quick Reference

        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.

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                                 16
        When a dataset is printed, the first byte of each logical record may be used for carriage
        control. One of two values may be coded to identify the type of carriage control used:

                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

        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.

        DSORG            Is Dataset organization. The value coded with a DSORG subparameter
                         will be one of four non-VSAM dataset organizations.

                         PS – Physical Sequential. This is the default value and need not be
                         coded. Most of our data will be physical sequential.

                         IS – Indexed Sequential. This is an ISAM (Indexed Sequential Access
                         Method) dataset. These datasets consist of data and index components.
                         As for now, they are outdated, but may still exist and would have to be
                         defined via DSORG.

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                                   17
                         DA – Direct Access. DA should be coded whenever a direct access
                         dataset is created and occasionally when it is retrieved.

                         PO – Partitioned Organization. PO identifies partitioned datasets or
                         libraries. DSORG=PO is coded only for documentation. PO is used
                         when the dataset is created without a request for directory space. Rarely
                         is it necessary to code DSORG=PO when retrieving an existing PDS.

                Here are examples of DCB and DSORG JCL statements:
                //     DCB=(LRECL=80,BLKSIZE=800,RECFM=FB,DSORG=PS)
                //     DCB=(BLKSIZE=6356,LRECL=6352,RECFM=VB)
                //     DCB=(BLKSIZE=32760,LRECL=32756,RECFM=VB)
                //     DCB=(BLKSIZE=19069,RECFM=U)

            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.

               //        DCB=(BLKSIZE=4000,LRECL=1,RECFM+FBA,DSORG=PS,BUFNO=2)

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                               18
                         NULL and COMMENT Statements
Two other JCL statements may be of use to use to you, the Null statement and the Comment

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.

COMMENT Statement – Comments are sometimes coded as an aid to documenting JCL.
Columns 1-3 contain (//*). The “comment” is coded in columns 4-80.

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                            19
Summary of the three major JCL statements:

Name of Statement                                  Purpose

JOB                                                Marks the beginning of a job; assigns a name to
                                                   the job.

EXEC                                               Marks the beginning of a job step, identifies the
                                                   program to be executed.

DD                                                 Identifies a data set and describes its attributes.

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                                   20
                                 Detecting Coding Errors
Error code descriptions can be found in the QW(Quick Reference Manual). Using a TSO session
(HINT: ISPF Panel 6), type QW and press [ENTER]. You will come to the Quick Reference

Please do the following activities so that you can become more familiar with the QW Manual.


1. Type QW from the command line of any ISPF Panel and press [ENTER]. This will bring up
   the QW Main Menu Panel.

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                             21
2. Enter an R on the command line and press [ENTER]. You will now be in the Quick
   Reference Information Panel.

3. Enter S0C7 on the Item Line and press [ENTER].

4. Select the line IBM0S390 System codes by putting an S next to the appropriate line. Press

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                              22
5. You should now see the description for the S0C7 Abend. This is one of the most common
   abends in Assembler.

6. Use QW (Quick Reference) to determine the meaning of the following error codes(Hint:
   Item line):

Abend Codes:                  Descriptions:







7. You will see additional error codes on the following page regarding JCL errors.

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.

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                          23
We will look at some sample error messages you could receive while running a job. All of these
error messages can be found in the Quick Reference Manual.

Example 1:
IEF642I JCL Statements

        //LA$JOE JOB 31SPC03090156W,CLASS=B

        Error Message received:

        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

Example 2:
      //LA$JOE JOB 31SPC03090156W,CLASS=V

        Error Message received:

        This means that PGM has been misspelled (PGR).

Example 3:

        //LA$JOE JOB 31SPC03090156W,CLASS=B

        Error Message received:

        This message was received because there are blank spaces within the PGM parameter. It
        should read PGM=IEFBR14.

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                            24
Please see your mentor so that you can print off a copy of Systems Communication C1614
(From Systems Communications Database Notes 003) for Jobclass information.

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

1) Copy 100 records from a tape dataset to a TSO dataset.
   a) Print the write-up for NG081 from the Life Computer Operations Manual.
   b) Ask your mentor for the name of a production tape dataset that you might be using on
      your project.
   c) Find the Volume Serial number for the most recent creation of the tape dataset. (Hint:
      Use M.3.2)
   d) Find the DCB information (LRECL, BLKSIZE, and RECFM).
   e) Create member NG081 in your ISPF.JCL to copy the 1st 100 records of the tape dataset
      into a TSO dataset in your catalog.
      i) Hints:
          (1) The JOBNAME should begin with your 4-digit logon ID.
          (2) Optional DD statements do not need to be included.
          (3) Required DD statements that we don’t need should be coded as DD DUMMY.
          (4) Retain the dataset you create for 4 days.
          (5) Have all messages go to SAVRS.
          (6) Your JOBPARM statement should have S=5100.
   f) Submit the JOB (Type SUB in the command line and press enter).
   g) Find and browse the job output on SAVRS.
   h) Browse the newly created dataset. (HINT: Use both ISPF panels 3.4 and M.1)
      i) Did you get 100 or fewer records?
      ii) When does your new dataset expire?

2) Copy a TSO dataset to another tso dataset.
   a) Edit your newly created ISPF.JCL(NG081) member.
   b) Duplicate everything in the member by over-typing the left-hand end of the first line
      number and the last line number with ‘RR’ (ISPF Repeat block command).
   c) Insert a Null Statement prior to the 2nd JOB STATEMENT.
   d) Change the input tape dataset name to the name of some dataset from your mentor’s
      catalog. (NOTE: You will also need to change some other information.)
   e) Change the name of the dataset you are creating. (NOTE: You might have to change the
      DCB information. Check the format of your mentor’s dataset on 3.4).
   f) Copy the entire dataset, NOT JUST THE FIRST 100 RECORDS.
   g) Submit the job.
   h) Browse the job output on SAVRS.
      i) Did one or two jobs run? Why?
      ii) Did all the records get copied? (HINT: Count the number of records in the original
          dataset and the newly created dataset. By doing a tso count from the command line or
          from ISPF panel 6 on both datasets.)

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                                25
3) Copy a tso dataset to a tape dataset.
   a) Edit your ISPF.JCL(NG081) member.
   b) Change the dataset being created to a tape dataset.
      i) The name will not end with ‘.data’ or ‘.dxxx’.
      ii) Look back in the JCL section and determine whether the SPACE parameter is
   c) Remove the 2nd JOB and JOBPARM STATEMENTS from the JCL.
   d) DO NOT remove the Null Statement prior to the 2nd Execute Statement.
   e) Submit the Job.
   f) Browse the job output on SAVRS.
      i) Did both EXEC statements process? (Only the 1st should have processed).
      ii) What is the VOL=SER number of the newly created tape dataset.
      iii) When does it expire?
   g) Change the JCL one more time.
      i) Remove the Null Statement.
      ii) Change the tso and tape datasets that are being created.
      iii) Submit the Job.
      iv) Browse the job output on SAVRS.
           (1) Did both execute statements get executed? (They should have.)
           (2) How is this different than what happened in exercise 2?
   h) Ask your mentor why you might want to have several execute statements within one JCL
      member that execute the same program.

State Farm Post-IPEP Manual – JCL Section (last updated 07/31/00)                       26

Shared By: