[JCL Return Code]返回码SE37

Filed Under (JCL) by Raymond on 26-09-2008

Tagged Under :

今天干活,跑一条JCL,遇到了一个SE37的返回码。觉得这个返回码大家应该经常能遇到,所以就拿到这里来跟大家share一下。

问题描述:

出现问题的step那部分JCL功能很简单,就是把一个PDS中的member复制到另一个PDS中去。所以就不附加JCL了。我执行JCL之后,系统给的提示是:
12.50.28 JOB00348 -JOB Name STEP2 *SE37 71 .00 .00 .0 7095 1 0 0 0 0

在JOB LOG中,除了这个信息外,没有其他的信息。于是在IBM Library中查找返回码的信息,得到的结果是:

E37
Explanation: The error occurred when an output operation was requested. The data set was on a direct access or magnetic tape device. This system completion code is accompanied by message IEC032I. Refer to the explanation of message IEC032I for complete information about the task that was ended and for an explanation of the return code (rc in the message text) in register 15.

根据上面的解释,问题是输出文件用的PDS空间不够所导致的。

问题解决:

可以考虑重新建立一个空间更大的PDS,但是更简单的方式是对现有的PDS进行压缩。具体操作在ISPF 3.4中,如下图所示:

ISPF compass

ISPF compass

选择compress。压缩后,再次执行JCL,操作正常。

[JCL]JCL的续行问题

Filed Under (JCL) by Raymond on 20-08-2008

Tagged Under :

今天在JCL的续行问题上犯了一个小错误,在这share一下JCL中的续行问题。
JCL只允许在参数区和说明区有续行,当需要续行时,在当前行的第71列前必须将某个参数或某个子参数以及参数后的逗号写完整,且下一行第1、2列为“//”,第3列为空格,续行的内容只能从4~16列开始,如从16列后开始,将被认为是注释语句。下面是一个续行的例子:
//DATA DD DSN=SYS1.PARMLIB,
// DISP=OLD

JCLs about VSAM

Filed Under (JCL) by billrain on 09-05-2007

Tagged Under : ,

1, How to delete and define a cluster?

首先确认要创建的CLUSTER不存在,然后DEFINE一个CLUSTER,包括DATA和INDEX
//step1 EXEC PGM=IDCAMS
//SYSIN DD *
“DELETE ID.DEMO.SAMPLE

“SET MAXCC=0

“DEFINE CLUSTER (NAME(ID.NAME.NAME) -
“ “VOL(ID) –
“ “IXD KEYS(06 0) -
“ “RECSE(80 80)
“…
“ “DATA (NAME(ID.NAME.DATA) -
“…
“ “INDEX (NAME(ID.NAME.INDEX) -
/*

2, How to use REPRO and PRINT?

REPRO 用于讲一个FLAT FILE的DS的内容拷贝到一个VSAM DS里
PRINT 用于在SDSF里面查看一个VSAM文件的内容,因为一个VSAM是不能直接浏览的

//step2 EXEC PGM=IDCAMS
//IN1 DD DSN=ORININAL,DISP= –目标文件–
//OUT1 DD DSN=*.DEMO.SAPMLE,DISP=SHR –VSAM文件–
//SYSIN DD *
“REPRO INFILE(IN1) -
““““`OUTFILE(OUT1)
“PRINT INFILE(OUT1) -
““““`CHARACTER
/*

3, How to use VERIFY?

用于检查一个VSAM文件的完整性

//SYSIN DD *
“VERIFY DATASET(*.DEMO.SAMPLE)
/*

注:“表示空格

JCL about GDG

Filed Under (JCL) by billrain on 22-01-2007

Tagged Under : ,

1. 创建一个GDG,包括base和model:

//STEP1 EXEC PGM=IDCAMS
//GDGMODEL DD DSN=ST023.TEST.GDGMDL,

DISP=(NEW,CATLG,DELETE), SPACE=(TRK,(0)),
DCB=(RECFM=FB,LRECL=80,BLKSIZE=4000)

//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE GDG (NAME(ST023.TEST.GDG) LIMIT(100) –THIS IS GDG BASE!–
/*

2. 在GDG中创建DS:

//STEP2 EXEC PGM=IEBGENER
//SYSUT1 DD DSN=ST023.TEST.ORIGINAL,DISP=SHR
//SYSUT1 DD DSN=ST023.TEST.GDG(+1),

DISP=(NEW,CATLG,DELETE), SPACE=(TRK,(5,5)),
DCB=ST023.TEST.GDGMDL

//SYSPRINT DD SYSOUT=*

3. 删除GDG,删除其中的DS先:

//STEP3 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE ST023.TEST.GDG.*
DELETE ST023.TEST.GDGMDL
/*
//STEP4 EXEC PGM=IDCAMS,COND=(0,NE)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE ST023.TEST.GDG GDG
/*

Null Statement

Filed Under (JCL) by billrain on 06-01-2007

Tagged Under :


Null Statement

Null Statement Format

The last statement in a job is a null statement. It has slashes in positions 1 and 2 and blanks in positions 3 through 80.

Format:

//

Delimiter Statement

Filed Under (JCL) by billrain on 06-01-2007

Tagged Under :


Delimiter Statement

Delimiter Statement Format

The last statement in a job step is the delimiter statement. It has a slash in position 1, an asterisk in position 2, and blanks in positions 3 through 80.

Format:

/*

Comment Statement

Filed Under (JCL) by billrain on 06-01-2007

Tagged Under :


Comment Statement

Comment Statement Format

In addition to the comments field of any JCL statement, comments can be added to a job in a comment statement. You may use a comment statement to help clarify a confusing JCL statement or to identify the purpose or operation of a job. You should also place comments at the beginning of the job (after the job statement) to indicate who wrote the job, when it was written, and to explain what the job does. The entire comment is ignored when the job is processed and does not affect the output. A comment is identified by slashes in positions 1 and 2 and an asterisk in position 3.

Example (A caret (^) indicates a space.):

//*^^^THIS IS A COMMENT 

Example:

//***************************************************//*        This is an example of a comment.         *//*  The additional asterisks in this comment are   *//*  not necessary but they help to offset it so    *//*  that it is easy to spot with a quick glance.   *//*************************************************** 

Data Definition Statement

Filed Under (JCL) by billrain on 06-01-2007

Tagged Under :


Data Definition Statement

Data Definition Statement Format

Data definition statements describe data sets and their input or output requirements. Every data set used in a job must have a data definition statement. The data definition statement is entered after the execute statement that identifies the job step in which that data set is used. (Data sets may be used in more than one job step and require a data definition statement for each job step.)

Format (A caret (^) indicates a space.):

//ddname^DD^dsname

The ddname is the name that you assign to the data set and must begin in column 3. Use the same format described in this module in the section titled Jobname.

The dsname is the name of the data set being defined by the data definition statement. Specify DSNAME= (or DSN=) followed by the name of the data set where the data is (or will be) located.

Example (A caret (^) indicates a space.):

//PAYROLL^DD^DSN=MONTHLY.PAYROLL.DATA

The ddname is PAYROLL.

The dsname is MONTHLY.PAYROLL.DATA.

Format (A caret (^) indicates a space.):

//stepname.ddname^DD^dsname

Programs such as FORTRAN, COBOL, etc. sometimes require a prefix for further identification. The ddname would then be preceded by the name of the qualifier, stepname, and a period.

Example (A caret (^) indicates a space.):

//STEP1.PAYROLL^DD^DSN=MONTHLY.PAYROLL.DATA

The ddname (with qualifier) is STEP1.PAYROLL.

The dsname is MONTHLY.PAYROLL.DATA.

SYSOUT Data Sets

A SYSOUT data set is a system output data set. The word SYSOUT is used instead of the word DSNAME.

Format (A caret (^) indicates a space.):

//ddname^DD^SYSOUT=dsn

The dsn is the name of the data set where you want the data to be placed. (Refer to the Printing module of the CIS User’s Manual.)

Format (A caret (^) indicates a space.):

//ddname^DD^SYSOUT=*

The asterisk specifies that the output be printed using default designations. The default destination is the impact printer in the CIS Machine Room. The default paper is the green barred, 14 7/8″ x 8 1/2″ continuous form.

Format (A caret (^) indicates a space.):

//ddname^DD^SYSOUT=a

Replace a with the message class parameter option that you want to use. (The message class parameter is defined in this module in the section titled Message Class Parameter.)

Format (A caret (^) indicates a space.):

//ddname^DD^SYSOUT=(a,,nnnn)

Output for a data set may be directed to the laser printer in the CIS Machine Room by specifying the output class and printer form number. For this data set only, these parameters override the parameters in the JCL job statement and JES2 job parameter statement.

Replace the parameter, nnnn, with the printer form number that you want to use. A list of form numbers (with specifications) is available at the Help Desk.

Replace the parameter, a, with one of the following output classes.

Output classes (for laser printing)

A and X    Duplex    DrilledC          Simplex   DrilledD          Duplex    Non DrilledE          Simplex   Non DrilledF          Duplex    OtherG          Simplex   Other

Duplex prints on both sides of the paper.

Simplex prints on the front side of the paper.

Drilled punches three holes on the left side (portrait) or top (landscape) of the paper.

Non drilled indicates that no holes will be punched.

Other indicates that special handling is being requested. A JES2 message statement must be used to inform the operator how to handle the output.

SYSIN Data Sets

Sysin data sets provide input data to the job. The word, SYSIN, is used for the ddname.

Format (A caret (^) indicates a space.):

//SYSIN^DD^dsname

The dsname parameter provides the name of the data set in which the data is located.

Example (A caret (^) indicates a space.):

//SYSIN^DD^DSN=MONTHLY.PAYROLL.DATA

The input data is in data set MONTHLY.PAYROLL.DATA.

Format (A caret (^) indicates a space.):

//SYSIN^DD^DATA

or

//SYSIN^DD^*

These statements indicate that the data is in an in-stream data set that immediately follows the sysin data definition statement. The asterisk in the statement indicates that no JCL or JES2 statements are included in the data. Therefore, none of the data records can begin with //, /*, or //*.

Disk and Tape Data Sets

Data sets that are stored on-line (on disk) or off-line (on tape) have the same basic format.

Format (A caret (^) indicates a space.):

//ddname^DD^dsname,param1,param2

Parameters used to define a data set are represented here by param1 and param2. (Additional information is available in this module in the section titled Data Definition Statement Parameters.)

If a data set is created in a job, passed to another job step, and deleted within the same job, then the dsname should begin with two ampersands, & & .

Example (A caret (^) indicates a space.):

//WORKFILE^DD^DSN=& & TEMP

Data Definition Statement Parameters

Parameters are used to describe the physical characteristics of a data set. These vary depending on whether the data set is input, output, etc. Interim parameters are followed by a single comma (and no spaces). The final parameter must not be followed by a comma. Some of the more commonly used parameters are described in this section. For additional information about these and other parameters, refer to the IBM Manual, JCL Reference.

Volume Parameter

The volume parameter is used to indicate a specific tape or disk on which the data set resides. Cataloged data sets do not require this parameter. Uncataloged data sets require this parameter. A new data set does not require this parameter and it will be assigned a volume serial number that will be displayed with the job messages.

Format:

VOL=SER=aaaaaa

Replace aaaaaa with the volume serial number assigned to the data set.

Disposition Parameter

The disposition parameter describes the status of a data set and the processing of the data set at normal and abnormal termination. This parameter may have up to three positional subparameters. If more that one subparameter is used, they must be separated by commas and enclosed in parentheses.

Examples:

DISP=SHR

DISP=(NEW,PASS)

DISP=(OLD,DELETE,KEEP)

First Positional Disposition Subparameter

This subparameter identifies the status of the data set before the job is executed.

NEW    (default) The data set is created in this job step.OLD    The data set previously existed and this job step requires its      exclusive use.SHR    (share) The data set previously existed and can be used by more      than one job at the same time.MOD    (modify) A new data set is to be created or a sequential data      set exists and records are to be added to its end. This job      step has exclusive use of the data set.

Second Positional Disposition Subparameter

This subparameter instructs the operating system what to do with the data set if the job step ends normally.

DELETE     (default) The data set is deleted in this job step.KEEP       The data set is kept intact.PASS       The data set is kept for use by a later job step. (The last          job step that uses the data set will determine its final          disposition.)CATLG      The data set is kept and a catalog entry is created or          updated for it.UNCATLG    The data set is kept and its catalog entry is removed.

Third Positional Disposition Subparameter

This subparameter instructs the operating system what to do with the data set if the job step ends abnormally.

DELETE     The data set is deleted in this job step.KEEP       The data set is kept intact.CATLG      The data set is kept and a catalog entry is created or          updated for it.UNCATLG    The data set is kept and its catalog entry is removed.

Unit Parameter

The unit parameter is used to specify the tape or disk device on which the data set resides. Cataloged data sets do not require this parameter. Uncataloged and new data sets require this parameter.

Format:

UNIT=aaaaaa

Replace aaaaaa with one of the following:

TAPE      Any available reel tapeTAPEC     Cartridge tape  (for new or old data sets)TAPECC    Cartridge tape  (for new data sets)SYSDA     Any available SYStem Direct Access device  (SYSDA is the         generic name for any of the DASD (Direct Access Storage         Device) disk volumes.

Space Parameter

The space parameter is used to allocate space for new data sets. There are charts available to aid in the determination of the amount of space needed for a data set. If you need assistance, you may consult the Help Desk. (The 3380 device currently in use has 47,476 bytes per track and 712,140 bytes per cylinder.)

Format:

SPACE=(aaa,(p,s))

Replace aaa with CYL (cylinders), TRK (tracks), or a block length (if the data set is small).

Replace p with the amount of primary allocation space that you need for your data set.

Replace s with the amount of secondary allocation space that you want to be allocated to your data set if the primary allocation becomes insufficient. (No more than fifteen secondary allocations will be made.)

Example:

SPACE=(CYL,(10,2))

Ten cylinders of space will initially be allocated to this data set. Additional space will be allocated, as needed, two cylinders at a time. The maximum amount of space that can be allocated to this data set is 40 cylinders (10 + (15 X 2)).

Example:

SPACE=(800,(500,100))

The units, 800, represents a block size of 800 bytes.

Five hundred blocks (400,000 bytes) will initially be allocated to this data set. Additional space will be allocated, as needed, one hundred blocks (80,000 bytes) at a time. The maximum amount of space that can be allocated to this data set is 2,000 blocks (500 + (15 X 100)).

Data Control Block Parameter

The data control block parameter is used to define a new data set. The subparameters are keyword parameters so they may be in any order. (Additional information is available in this module in the section titled Keyword Parameters.)

Format:

DCB=(LRECL=nnn,BLKSIZE=nnnnn,RECFM=aaa)

Replace aaa with one of the following record format (RECFM) subparameters:

F      Fixed length, unblockedFB     Fixed length, blockedV      Variable length, unblockedVB     Variable length, blockedVBS    Variable length, blocked, spannedU      Undefined

Replace nnn with the length of the longest record in the data set. This is the record length subparameter (LRECL).

Replace nnnnn with the length of each block in the data set. This is the block size subparameter (BLKSIZE). For fixed format, the block size is some multiple of the record length. (Additional bytes have to be added to the record length multiple when variable format is used.) Optimal block sizes may be determined by referring to tables for the unit on which the data set will reside or by using the Blocksize Command.

Blocksize Command

A programming aid is available on TSO that will help you to determine the block size. At the TSO READY> prompt, type the following command:

BLKSIZ

You will be prompted for the following:

1.  RECFM (F or V)2.  (Fixed)   LRECL =2.  (Variable)   MODAL LRECL(INCLUDING RDW) =3.  Number of records =

Suggested allocation characteristics will be displayed in the form of:

1.  an ISPF 3.2 screen,2.  a JCL space parameter, and3.  a TSO Allocate command.

(Information about TSO and ISPF may be found in the CIS User’s Manual module, TSO Introduction.)

You still must make some decisions. If you are creating a partitioned data set, you must specify the number of directory blocks. If you wish to allow for expansion, you need to specify a secondary space quantity. (Additional information is available in this module in the section titled Space Parameter.)

Data Definition Statement Examples

Example (A caret (^) indicates a space.):

//GO.SYSIN^^^^DD^DSN=U19999A.PROGRAM.DATA,DISP=SHR

This data definition statement informs the operating system that the SYSIN input data is located on a disk in a cataloged data set named U19999A.PROGRAM.DATA and that the data set may be accessed by other jobs. (The disposition parameter is the only parameter required for a cataloged, pre-allocated data set .)

The qualifier GO. preceding the ddname SYSIN indicates that this data definition statement is used in a job step with the stepname GO.

Example (A caret (^) indicates a space.):

//OUTPUT^^^DD^SYSOUT=(A,,9021)

This data definition statement specifies that the data defined by the name OUTPUT be directed to the laser printer in the CIS Machine Room.

The data will be printed on form 9021 (8 1/2″ x 11″, landscape, 132 characters per line, gray bar paper).

Class A specifies that the data be printed on both sides of the paper and that three holes be punched at the top of the front of the page.

Example (A caret (^) indicates a space.):

//NEWDATA^^DD^DSN=U99999A.NEWDATA.CNTL,UNIT=SYSDA,

// DISP=(NEW,CATLG),SPACE=(TRK,(5,5)),

// DCB=(LRECL=80,BLKSIZE=9040,RECFM=FB)

The data definition statement name is NEWDATA.

The data set name is U99999A.NEWDATA.CNTL.

The disposition parameter instructs the operating system to create a new data set and to catalog it.

The unit parameter specifies that the data set be located on one of the system disks.

The space parameter specifies that five initial tracks of disk space be allocated with increments of five tracks added as needed.

The data control block parameter specifies that the record length of the data is 80 bytes, the blocksize is 9040 (113 records), and that the format of the data is fixed, blocked.

Example (A caret (^) indicates a space.):

//SYSUT2^^^DD^DSN=U99999A.OLDDATA.CNTL,UNIT=TAPEC,

// DISP=(OLD,KEEP),VOL=SER=C12345,LABEL=5

The data definition statement name is SYSUT2. This ddname is one that is sometimes required by IBM utility programs such as IEBGENER.

The data set name is U99999A.OLDDATA.CNTL.

The disposition parameter instructs the operating system that this data set already exists and that it is to be kept at the end of this job step.

The unit parameter indicates that the data set is located on a cartridge tape.

The volume parameter indicates that the volume serial number of the tape is C12345.

The label parameter indicates that the data set is the fifth data set on the tape.

Execute Statement

Filed Under (JCL) by billrain on 06-01-2007

Tagged Under :


Execute Statement

Execute Statement Format

The execute statement is used to identify a program or procedure that you want to execute. The stepname is a name that you assign. Use the same format described in this module in the section titled Jobname.

Format (A caret (^) indicates a space.):

//stepname^EXEC^PGM=progname

The positional parameter, PGM=, is used to identify the program that the system is to execute. The specified program must be a member of a partitioned data set used as a system library, a private library, or a temporary library.

The progname is the name of a program that you want to execute. If this program resides in a private library, that library must be specified in the job by a JOBLIB data definition statement or in a job step by a STEPLIB data definition statement.

Format (A caret (^) indicates a space.):

//stepname^EXEC^PROC=procname

or

//stepname^EXEC^procname

The optional positional parameter, proc=, is used to specify that the system is to call and execute a cataloged or in-stream procedure.

The procname is the name of a procedure that you want to execute. If the procedure is in-stream, it must be before the execute statement.

Execute Statement Examples

Example (A caret (^) indicates a space.):

//STEP1^^^^EXEC^IDCAMS

The stepname is STEP1.

The IDCAMS procedure is executed by this job step.

Example (A caret (^) indicates a space.):

//COPY^^^^^EXEC^TAPECOPY,TAPEIN=T12345,TAPEOUT=T678 90

The stepname is COPY.

The TAPECOPY procedure is executed by this job step.

The parameters following the procedure name instruct the system to copy the information from tape T12345 to tape T67890.

Job Statement

Filed Under (JCL) by billrain on 06-01-2007

Tagged Under :


Job Statement

Job Statement Format

The job statement names a job, supplies accounting information, and supplies options that affect the processing of the job.

Format (A caret (^) indicates a space.):

//jobname^JOB^(*),username,TIME=(n,nn ),NOTIFY=*,

// CLASS=a,MSGLEVEL=(n,n),MSGCLASS=a,TYPRUN=aaaa

In this and the following examples, a represents an alphanumeric value and n represents a numeric value. You will need to supply these values.

Jobname

The jobname can be your userid or any name you select. The first character of the jobname must be alphabetic. The name may contain up to eight characters including the national characters, $, #, and @. To view your output via TSO and the OUTPUT command, you must include your userid in the jobname. To view your output via TSO and the IOF command, you may use any properly coded name.

Examples:

TRNSCRPT

U12345A

CHK#3

Accounting Information

The asterisk allows the system to supply the accounting information from your userid.

Username

The username is the name of the person the job belongs to. It must be enclosed in single quotes if it contains blanks or special characters and may be a maximum of twenty characters including the quotes.

Examples:

JACKSON

‘DEREK JACKSON’

‘C. R. JACKSON, III’ (maximum length)

Class Parameter

Format:

CLASS=a

The class parameter is used to group similar jobs together according to time requirements and tape or printer resource needs. Replace a with one of the following options.

Class Parameter Options

1. Five seconds or less with no tape mounts

2. (default) One minute or less with no tape mounts

3. No time limit and no tape mounts

4. Time available processing with no time limit and no tape mounts (The cost for Class 4 processing is 10% of the first shift rate. This class is designed for large research projects only and permission from CIS is required. There is no guarantee that a Class 4 job will run on the same day that it is submitted. Additional information is available in this module in the section titled Second and Third Shift Processing.)

C    No limits  (restricted to ISS Production use)D    Less than one minute with no more than one tape mount  (restricted    to ISS Development use)X    Less than or equal to one minute with a maximum of three tape    mounts (at a time) availableY    Less than or equal to five minutes with a maximum of three tape    mounts (at a time) availableZ    No time limit with a maximum of three tape mounts (at a time)    available

Time Parameter

Format:

TIME=(n,nn)

The time parameter specifies the processing time limit in minutes and seconds. The first positional subparameter, n, represents 0 to 9 minutes. The second positional subparameter, nn, represents 00 to 60 seconds.

Notify Parameter

Format:

NOTIFY=*

The notify parameter specifies who the system should notify under TSO when the job has completed processing. The asterisk indicates that the person who submitted the job will be notified.

Message Level Parameter

Format:

MSGLEVEL=(n,n)

The message level parameter controls the printing of allocation messages and JCL. Replace the first positional subparameter, n, with one of the JCL subparameter options. Replace the second positional subparameter, n, with one of the allocation subparameter options.

JCL Subparameter Options

1. All user supplied JCL and the JCL used in executed catalogued procedures will be printed.

2. (default) Only user supplied JCL will be printed.

Allocation Subparameter Options

1. (default) No allocation messages are printed unless the job terminates abnormally.

2. All data set allocation and de-allocation messages are printed.

Message Class Parameter

Format:

MSGCLASS=a

The message class parameter is used to specify the format of the output. Some special message classes specify laser printer formats. They are defined in this module in the section titled SYSOUT Data Sets. Replace a with one of the following options.

Message Class Options

A    Output will be printed on the impact printer in the Machine    Room or on any other printer depending upon the print    destination specified.X    Output will be held under TSO so that it may be scanned    before being released to print through IOF or OUTPUT. Output    will be deleted after 72 hours if not released to print.Y    Output will be held for one hour and then deleted. To print    the output, change the "Y" before the output is deleted.

Type Run Parameter

Format:

TYPRUN=aaaa

The type run parameter is optional. If, you choose to include it in your job statement, replace aaaa with one of the following options.

Type Run Parameter Options

HOLD    The job will not be scheduled for processing until it       is released. SCAN    The JCL will be scanned for correct syntax. The only       output will be the JCL and any error messages. The actual       processing of the job will not be started until the job is       resubmitted without the scan option.

Second and Third Shift Processing

Processing time on the IBM 3090 mainframe computer is divided into three sections (shifts).

1. 7:00 a.m. to 6:00 p.m.

2. 6:00 p.m. to midnight

3. midnight to 7:00 a.m.

Jobs may be run during the second or third shift at a lower cost than during the first shift. The rate for the second shift is 70% of the first shift rate. The rate for the third shift is 40% of the first shift rate.

Format (A caret (^) indicates a space.):

//jobnam@m^JOB^(*),username,TIME=(n,nn),NOTIFY=*,

// CLASS=a,MSGLEVEL=(n,n),MSGCLASS=a,TYPRUN=HOLD

The shift designator, @m, must be the last two characters in the jobname. Use @2 to release a job at 6:00 p.m. or @3 to release a job at midnight. If the job is submitted during the second or third shift, the type run parameter is not necessary. (If the job is not finished processing by 7:00 a.m., it will be cancelled.) Additional information is available in this module in the section titled CLASS Parameter.

Job Statement Examples

Example (A caret (^) indicates a space.):

//SAMPLE@2^JOB^(*),’KAREN A. HOLT’,TIME=(0,5),

// CLASS=1,TYPRUN=HOLD,MSGLEVEL=(1,1),NOTIFY=*

The jobname is SAMPLE@2. The accounting information is automatically supplied from the TSO userid by the use of the asterisk. The username is KAREN A. HOLT. It is enclosed in single quotes because it contains spaces and a period.

The time parameter requests that the maximum processing time allotted to this job be five seconds.

The class 1 parameter is used because there are no tape mounts and the maximum time allotment for Class 1 is five seconds.

The type run parameter and the @2 shift designator request that this job be held until the beginning of the second shift (6:00 p.m.).

The message level parameter requests that all JCL and allocation messages be included in the output.

The notify parameter requests that a message be sent (via a TSO terminal) to the person who submitted the job.

Example (A caret (^) indicates a space.):

//B19999A^JOB^(*),KIMBERLY,TIME=2,CLASS=3,TYPRUN=SC AN

The jobname is B19999A. The userid, B19999A, permits viewing the output via TSO and the OUTPUT command.

The accounting information is automatically supplied from the TSO userid by the use of the asterisk.

The username is KIMBERLY. It does not require quotes to be used.

The time parameter requests that the maximum processing time allotted to this job be two minutes.

The class 3 parameter is used because there are no tape mounts and there is no time limit for Class 3.

The type run parameter requests that this JCL be scanned for errors.

Constructing JCL Statements

Filed Under (JCL) by billrain on 06-01-2007

Tagged Under :


Constructing JCL Statements

JCL Statement Format

Job Control Language (JCL) is very precise. It has specific rules of grammar and syntax that must be followed. Many programming languages accept variable numbers of spaces, upper or lower case letters, and other inconsistent uses of commands. JCL must not contain any irregularities. The JCL will be rejected if it contains typographical errors (including extra or missing spaces or commas), fields in the wrong order, etc. JCL and JES2 statements (except for comments) must not contain lower case letters. Don’t worry about the specific commands for now. Just pay attention to the order and the syntax.

In this module, a space in a JCL statement is indicated by a caret symbol (^). Do not type the caret symbol! Type a space in its place!

Basic JCL Statements

Job Statement

The job statement names a job, supplies accounting and billing information, and supplies options to control processing of the job.

Execute Statement

The execute statement instructs the computer which program or procedure to execute.

Data Definition Statement

The data definition statement identifies data sets that will be used or created by the job and instructs the computer what to do with the data sets at the end of the job.

Comment Statement

The comment statement contains comments. It is used primarily to document a program and its resource requirements.

Delimiter Statement

The delimiter statement signifies the end of a job step.

Null Statement

The null statement signifies the end of a job.

Other JCL Statements

If you need more information about the JCL statements in this section, contact the Help Desk.

Procedure Statement

The procedure statement marks the beginning of an in-stream procedure and may mark the beginning of a cataloged procedure. It also assigns default values to parameters defined in the procedure.

Procedure End Statement

The procedure end statement marks the end of an in-stream procedure.

Control Statement

The control statement marks the beginning of one or more program control statements.

End Control Statement

The end control statement marks the end of one or more program control statements.

Output JCL Statement

The output JCL statement specifies the processing options that the job entry subsystem uses to print a sysout data set.

JCL Command Statement

The JCL command statement enters an MVS system operator command through the input stream. (The command statement is primarily used by the system operator.)

JCL Statement Fields

A JCL statement is organized into sections called fields. The computer expects to find certain information in specific locations, fields, within a statement. The five fields must always provide the same types of information and appear in the following order:

1. Identifier (ID) Field

2. Name Field

3. Operation Field

4. Operand Field

5. Comments Field (optional)

Example (A caret (^) indicates a space.):

//DDNAME^DD^DSN=U19999A.PROGRAM.DATA,DISP=SHR^Comme nt

// is in the Identifier Field

DDNAME is in the Name Field

DD is in the Operation Field

DSN=U19999A.PROGRAM.DATA,DISP=SHR is in the Operand Field

Comment is in the Comments Field

Identifier Field

The identifier field is the first field in a JCL statement. Two slashes, //, in positions 1 and 2 instruct the computer to expect a JCL statement. A slash and an asterisk (/*) in positions 1 and 2 identify a JES2 statement. If you are entering data, omit the identifier.

Name Field

The name field assigns a name to the statement to identify it for current use or later reference or both. The name begins in position 3 and consists of one to eight alphanumeric characters. The first character must be alphabetic. The name field is followed by at least one space.

Operation Field

The operation field identifies the type of JCL statement by specifying the statement’s function. The operation field is followed by at least one space.

Operand Field

The operand field contains information that determines how the JCL statement is processed. Multiple parameters must be separated by commas. Spaces must not be within or between the parameters.

Comments Field

The comments field contains information to remind you why you wrote the statement. The computer disregards this field. The comments field must be preceded by at least one space.

Position 72

Always leave this position blank.

Continuing a JCL Statement

When a JCL statement needs to be continued on another line, there are specific coding rules to follow.

1. Interrupt the field after a comma and before position 72.

2. Begin the next line with slashes in positions 1 and 2 and a space in position 3.

3. Continue the interrupted parameter or field beginning in any position from 4 through 16.

Example (A caret (^) indicates a space.):

//U99999A^JOB^,’NAME’,TIME=(1,20),

// CLASS=2,MSGCLASS=I,NOTIFY=*

The second line is a continuation of the first line.

Parameters

When you choose what to place in a specific field, you fill in parameters. Parameters provide the computer with the information it needs to determine what to do and how to do it. For example, the time parameter in the preceding example instructs the computer that the CPU should not process the job for longer than one minute and twenty seconds. Other parameters provide your name, billing information, etc. The two basic types of parameters are positional parameters and keyword parameters. All positional parameters must precede all keyword parameters.

Positional Parameters

A positional parameter must be placed in a specific position within the operand field. (If you want to omit a positional parameter, you must replace that parameter with a comma.)

Example (A caret (^) indicates a space.):

//U99999A^JOB^(*),’ANGELA COOK’

In this example, the two positional parameters are separated by a comma. The first parameter, (*), allows the system to determine accounting information from the TSO logon userid. (Accounting information is always positioned as the first parameter following the job name field.) The second parameter, ‘ANGELA COOK’, is the user’s name.

Keyword Parameters

Keyword parameters have no special position or order within the operand field. However, they follow any required positional parameters within a job statement. A keyword is entered followed by an equal sign and a value.

Example:

TIME=(1,30)

This parameter contains the keyword, TIME, followed by an equal sign and two values in parentheses. (This example instructs the computer that the CPU should not process the job for longer than one minute and 30 seconds.)