Você está na página 1de 12

JCL AND JCL UTILITIES

PRESENTED BY JAGRUTI MOHANTY-674169 AUROPRIT BHANJADEO-676236


1

INTRODUCTION TO JCL & JCL UTILITIES


JCL is a scripting language used on IBM mainframe operating systems to instruct a system the system on how to run a batch job or start a subsystem. There are actually two IBM JCL's: one for the operating system lineage that begins with DOS/360 and whose latest member is ; Z/VSE and the other for the lineage from OS/360 to Z/OS. They share some basic syntax rules and a few basic concepts, but are otherwise very different. There are 8 JCL statements. They are:1.Job 5.//* Comment 2.Exec 6./* Delimiter 3.DD 7.// null ending statement 4.Pend 8. Proc

JOB STATEMENT
Job is considered as a unit of work that has to be executed. For execution a mainframe program requires all the resources to be specified. SYNTAX of job statement: //name JOB parameters( positional, keyword) comments Following are the parameters specified: 1.Accounting Information. 2.CLASS: Categorization of the job. 3.MSGCLASS:is used to specify where the job output will be directed. 4.MSGLEVEL:Specification of printing the system messages. 5.PRTY:Assignment of priority to the job. 6.TYPRUN: Holding the execution of the job for later execution. 7.NOTIFY:Send messages to the user.

RULES FOR CODING JOB STATEMENT


First two columns should precede the positional parameter. JOB NAME:have // followed by valid jobname. JOB word must be coded before 16th column. Keyword parameters should not Jobname must start in 3rd column. Valid names can be alphanumeric with max length 8 characters. National characters are also allowed(@,# & $). Positional Parameters:It has two parameters. Accounting Information:used for billing to be run on the system. SYNTAX:(account-number,additional-accounting-information) or 'account-number,additional-accounting-information' or account-number,additional-accounting-information

UTILITIES
Utility is a useful tool that helps in expediting a task,i.e maintaining and organizing data. Some of the key functions are: 1. Copy the sequential and partitioned data sets. 2. Catalog and catalog data sets. 3. Rename and compress data sets. 4.Include and exclude members to partitioned data sets. 5.Compare sequential and partitioned dataset. 6.Create generation data group. SYNTAX ://stepname EXEC PGM=utility-name,

IEBGENER
To copy from one sequential file to another.
We specify the original and destination names. The RECFM,LRECL attributes of both data sets must be same. SYNTAX://stepname EXEC PGM=IEBGENER

IEBCOPY
To copy partitioned data sets or sequential we use it. this is known as unloading. It can be used to restore the PDSs to direct access devices. this is know as loading. To compress the datasets Include members of a PDS within a copy transaction Exclude members of PDS within a copy transaction

IEBCOPY has 4 main functions. Copy partitioned data sets which is of two types i.e. loading and unloading. Compress partitioned data sets. Include members of partitioned data sets within a copy of transaction. Exclude members of partitioned data sets within a copy of transaction. Unloading data sets: It copies one PDS into another PDS with the help of COPY statement. //IEBCOPY1 JOB A123, 'J.FOSTER' //STEP1 EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=A //SYSUT1 DD DSN=COBOL.FILE1, // DISP=SHR //SYSUT2 DD DSN=COBOL.FILE2, // DISP=(NEW,KEEP),

// UNIT=TAPE1,VOL=SER=9999 //SYSIN DD * COPY INDD=SYSUT1, OUTDD=SYSUT2 /* // LOADING DATA SETS: Loading is used for restoration of partition data sets from tape to direct access devices like disk. //IEBCOPY1 JOB A123, 'J.FOSTER' //STEP1 EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=A //SYSUT1 DD DSN=COBOL.FILE1, // DISP=OLD, // UNIT=TAPE1, // VOL=SER=8888

//SYSUT2 DD DSN=COBOL.FILE1, // DISP=(NEW,CATLG), // UNIT=DISK1, // SPACE=(TRK, (40,10)) //SYSIN DD * COPY INDD=SYSUT1, OUTDD=SYSUT2 /* //

This utility is used to: Compare two sequential data sets. Compare two partitioned data sets. If data sets are identical then return code will be 0 upon successful execution or else 8 will be returned upon non-identical data sets. Data sets must have same record length and format for execution but block size need not be same. EXAMPLE //jobname JOB (accounting-information),programmer name,keyword parameters.... //stepname EXEC PGM=IEBGENR //SYSPRINT DD SYSOUT=PRINT DEVICE CLASS //SYSUT1 DD DSN=DATA-SET1-FEATURES //SYSUT2 DD DSN=DATA-SET2-FEATURES //SYSIN DD * COMPARE TYPORG=DATA-SET-TYPE

IEBCOMPR

IEFBR14
This program is a null program. Origined from assembler language to be used for exiting a procedure or program. It executes a single statement which specifies end of program. Since this program does nothing it can be used to check syntax of JCL without affecting any data sets.

Você também pode gostar