JCL Day 2. 2 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Agenda for Day 2  DD statement  Syntax  Parameters  Procedures.

Slides:



Advertisements
Similar presentations
Introduction to C Programming
Advertisements

HORIZONT 1 XINFO ® The IT Information System z/OS - JCL HORIZONT Software for Datacenters Garmischer Str. 8 D München Tel ++49(0)89 /
Stephen Linkin Houston Community College 3/21/2007 © Mike Murach & Associates, HCC, IBM 1 Managing Generation Data Groups.
Stephen Linkin Houston Community College 5-Apr-07 © Mike Murach & Associates, HCC, IBM 1 Using AMS (Access Method Services)
Euro/File Demonstration Domino Software Limited. EURO/File EURO/FILE works on a very simple principle and requires four steps to perform a run: Define.
HORIZONT 1 DSN/Change The Dataset Renaming System HORIZONT Software for Datacenters Garmischer Str. 8 D München Tel ++49(0)89 /
Introduction to z/OS Basics © 2006 IBM Corporation Chapter 10: Compiling and link-editing a program on z/OS.
Introduction to the new mainframe: z/OS basics © Copyright IBM Corp., All rights reserved. Chapter 9 Compiling and link-editing a program on z/OS.
Introduction to z/OS Basics © 2006 IBM Corporation Chapter 10: Compiling and link-editing a program on z/OS.
5/2/ ER/CORP/CRS/OS02/003-1 Job Control Language Bhargava KC Extension: E&R Rotunda, II Floor, Cubicle 15
HORIZONT 1 SmartJCL ® The Complete JCL Solution Product Presentation HORIZONT Software for Datacenters Garmischer Str. 8 D München Tel ++49(0)89.
MVS/ESA Fundamentals of VSAM © Copyright IBM Corp., 2000, All rights reserved.
Introduction of z/OS Basics © 2006 IBM Corporation Chapter 5: Working with data sets.
12 IBM OS/JCL: DD Statements. //TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP) The DD Statement: – Defines a data set to the operating system.
Introduction to z/OS Basics © 2006 IBM Corporation Chapter 6: Using Job Control Language (JCL) and System Display and Search Facility (SDSF)
Chapter 5: Working with data sets
IBM ISPF Productivity Tool © 2008 IBM Corporation IBM ISPF Productivity Tool for z/OS V 5.9 More Than Just ISPF.
Stephen Linkin Houston Community College 19-Jan-07 © Mike Murach & Associates, HCC, IBM 1 RESTART And Other Program Execution Facilities.
Stephen Linkin Houston Community College January 15, 2007 © Mike Murach & Associates, HCC, IBM 1 Introduction To IBM Mainframe Systems Chapter.
Welcome to SAS…Session..!. What is SAS..! A Complete programming language with report formatting with statistical and mathematical capabilities.
Stephen Linkin Houston Community College 1/31/07 © Mike Murach & Associates, HCC, IBM 1 Using JCL and JES To Manage Program Execution Chapter.
OO Cobol in z/OS.
JCL Day 1. 2 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Course Plan Day 1 :Introduction to JCL, JOB & EXEC statement,
A Simple Cobol Example – ISPF vs RDz Enterprise Systems1.
Stephen Linkin Houston Community College 5-Feb-07 © Mike Murach & Associates, HCC, IBM 1 Using JCL Facilities To Allocate Other DASD Data.
Introduction to the new mainframe © Copyright IBM Corp., All rights reserved. Chapter 8: Using Job Control Language (JCL) and System Display and.
Click to add text Introduction to z/OS Basics © 2006 IBM Corporation Chapter 6: Using Job Control Language (JCL) and System Display and Search Facility.
SAS Efficiency Techniques and Methods By Kelley Weston Sr. Statistical Programmer Quintiles.
© Copyright. All rights reserved. Datatask Pty Ltd JCL Standards #4 Company Name.
10/16/ ER/CORP/CRS/OS02/003-4 JCL DAY 4. 10/16/ ER/CORP/CRS/OS02/003-4 VSAM DATASETS (virtual storage access method) These are the logical.
IBM ISPF Productivity Tool © 2008 IBM Corporation IBM ISPF Productivity Tool for z/OS V 5.10 More Than Just ISPF.
Subprograms CE 311 K - Introduction to Computer Methods Daene C. McKinney.
Stephen Linkin Houston Community College 21-Feb-07 © Mike Murach & Associates, HCC, IBM 1 Using JCL Procedures.
Stephen Linkin Houston Community College 26-Feb-07 © Mike Murach & Associates, HCC, IBM 1 How To Process Jobs Conditionally.
DB2. 2 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/DB01/003 Version No:2.0a Session Plan Introduction to Concurrency Control Different types.
Introduction to the new mainframe © Copyright IBM Corp., All rights reserved. Chapter 4: Working with data sets.
MVS (Day 2). Copyright © 2005, Infosys Technologies Ltd 2 ER/CORP/CRS/OS01/003 Version No: 1.0 Agenda Data Management –Definition of data set and Record.
MVS. Traditional Mainframes Mainframe operating systems were designed to concurrently process several batch applications. Over time: – The number of concurrent.
10/26/ ER/CORP/CRS/OS02/003-3 JCL DAY 3. 10/26/ ER/CORP/CRS/OS02/003-3 PROCEDURES It is a prepacked JCL. JCL needed by many different users.
VSAM Alternate Indexes Department of Computer Science Northern Illinois University August 2005.
JCL Day 3. 2 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Agenda for Day 3  VSAM data sets  Definition & Types 
Lecture 31 Creating Executable Programs on the Mainframe Tuesday, January 20, 2009.
 Classes in c++ Presentation Topic  A collection of objects with same properties and functions is known as class. A class is used to define the characteristics.
1 Using JCL And SDSF Stephen S. Linkin Houston Community College © HCCS and IBM 2008 ©HCCS & IBM® 2008 Stephen Linkin.
1 Working With Data Sets Stephen S. Linkin Houston Community College © HCCS and IBM 2008 ©HCCS & IBM® 2008 Stephen Linkin.
Application Program Design Day3. 2 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/TP01/003 Version No: 1.0 Objectives Basic CICS programming –Structure.
Introduction to z/OS Basics © 2006 IBM Corporation Chapter 7: Batch processing and the Job Entry Subsystem (JES) Batch processing and JES.
© Copyright. All rights reserved. Datatask Pty Ltd JCL Standards #1 Company Name.
Introduction to the new mainframe © Copyright IBM Corp., All rights reserved. Chapter 6: Using Job Control Language (JCL) and System Display and.
HORIZONT 1 XINFO ® The IT Information System z/OS - JCL HORIZONT Software for Datacenters Garmischer Str. 8 D München Tel ++49(0)89 /
HORIZONT XINFO – Scanner zOS – JCL1 HORIZONT XINFO – Scanner zOS – JCl.
JPMorganChase1 Care and Feeding of SMF in a Large System Environment Joe Babcock.
Classification : Internal DFSORT Utility. Classification : Internal Overview DFSORT is IBM's high-performance product for z/OS. Following operations can.
Ver 1.0/ 3 rd Sep 2001 Classification : InternalProprietary & Confidential VSAM.
The Complete JCL Solution
Cloning Flow for
XINFO – Scanner z/OS – JCL
JOB CONTROL LANGUAGE IDC Training Centre.
Batch Processing, JCL and SDSF
JCL Standards #2 Company Name
Disk Storage, Basic File Structures, and Buffer Management
Machine Independent Features
JCL Standards #3 Company Name
Company Name Date - Time
Company Name Date - Time
Overview of VSAM and Defining a Cluster
Presentation transcript:

JCL Day 2

2 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Agenda for Day 2  DD statement  Syntax  Parameters  Procedures  Types  Symbolic Parameters  Examples  IBM Utility programs  Definition and use  Examples

3 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 DD STATEMENTS ddnameDD * VOL DATA DCBSYSOUT DSNDUMMY UNIT DLM DISPSYSUDUMP SYSMDUMP SYSABEND REFERBACK JOBLIB STEPLIB

4 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 DSN The name of the data set Simple Name : 1 to 8 chars Qualified Name : separated by periods each name 1 to 8 chars total 44 characters including periods Temporary data sets : &&TEMP or do not mention DSN parameter Refer back : DSN=*.STEP1.DD1

5 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 DISP NEW,CATLG, DELETE OLD,KEEP, KEEP DISP= SHR,UNCATLG, CATLG MOD,DELETE, UNCATLG PASS, DISP=(status,normal-disposition,abnormal-disposition)

6 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 DCB LRECL=n (VALUE IN BYTES) RECFM=(F/FB/V/VB/U) BLKSIZE= multiple of LRECL DSORG=(PS/PO/DA)

7 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 SPACE SPACE=(space units,(primary,secondary,dir),RLSE) space unit - TRK(tracks)/CYL(cylinders)/BLOCKSIZE in bytes EX: SPACE=(TRK,(100,200)) SPACE=(TRK,(10,5)) - allocate 10 tracks primarily and if required as secondary allocation 5 tracks

8 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 UNIT Hardware address Type Group // UNIT=0320 OR // UNIT=3390 OR // UNIT=SYSDA OR // UNIT=DISK To use the same unit that has been used by prior DD statement // UNIT=AFF=ddname

9 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 VOL It is used to specify a disk volume or specific tapes. // VOL=SER=INUSR2,UNIT=SYSDA To referback a volume used by some prior DD statement use: // VOL=REF=ddname

10 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 SYSOUT // DDNAME DD SYSOUT=CLASS SYSOUT is used to route output to a device. // DDNAME DD SYSOUT=A If you want to send the output to the same device described by MSGCLASS of the job use: // DDNAME DD SYSOUT=*

11 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 JOBLIB STATEMENTS EX //ER5077A JOB,,CLASS=A //JOBLIB DD DSN=OPERN.CICS3.LOADLIB, The JOBLIB statement specifies the library (PDS) where the program is residing. It is placed after the JOB statement and is effective for every JOB steps. // DISP = (what should be the disposition) // DISP = SHR //STEP1 EXEC PGM=INHOUSE

12 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 STEPLIB STATEMENTS EX. //STEP1 EXEC PGM=INHOUSE //STEPLIB DD DSN=OPERN.CICS3.LOADLIB, The STEPLIB statement defines the library where the program is residing. It is placed after the EXEC statement and is effective for that particular step and overrides any JOBLIB statement. // DISP = (what should be the disposition) // DISP = SHR

13 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 The first JCL to create a PS. //ER5077J JOB 1234,ABC,CLASS=A, // MSGCLASS=(1,1) TO CREATE PS //STEP1 EXEC PGM=IEFBR14 //PS1 DD DSN=ER5077.OUTPUT.PSFILE, // UNIT=SYSDA, // VOL=SER=INUSR2, // DCB=(LRECL=80,RECFM=FB,BLKSIZE=800), // SPACE=(TRK,(1,1)),DISP=(NEW,CATLG)

14 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Review Questions  The positional parameters for an EXEC statement are PGM & PROC  COND Permits the execution of steps to depend on the return code from the Previous Steps  JOBLIB represents the collection of jobs ? False. Represents library for USER programs  JCL has JOBLIB. Step1 has STEPLIB statement. For Step2 the program would be searched in JOBLIB/STEPLIB library? JOBLIB. STEPLIB is valid for only Step1

15 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Review Questions ….  For the following JCL will Step 2 get executed? //ER5077J JOB,,NOTIFY=&SYSUID, COND=(4,LT) //STEP1 EXEC PGM=IEFBR14 //STEP2 EXEC PGM=IEFBR14,COND=(0,NE,STEP1) Yes. Step2 would be executed.  If COND parameter is mentioned in JOB & EXEC statement then what happens? COND mentioned in the JOB statement is evaluated first & then the COND mentioned in the EXEC statement

16 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 PROCEDURES  It is a prepacked JCL  A JCL needed by many different users  A JCL executed on a repetitive basis  A JCL often repeated within the execution of a single job

17 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 TYPE OF PROCEDURES  In-stream procedures  Coded in the executing job  Max of 15 per JOB  Catalogued Procedure  Member of a PDS (procedure library)  Max 255 steps

18 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Invoking a Procedure // EXEC procname // EXEC PROC=procname EX: //name1 EXEC MYPROC //name1 EXEC PROC=MYPROC

19 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 PROCEDURES must not contain : 1) JOB statement 2) JOBLIB DD statement 3) DD *, DD DATA - In-stream data 4) /* delimiter statement 5) // Null statement 6) JES statements 7) PEND statement (for cataloged procedures)

20 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 In-stream procedure 1.It must begin with a PROC statement and end with a PEND statement 2.It should be coded before the first EXEC statement invoking the instream procedure //ER5077J JOB,,CLASS=A //PROC1 PROC //STEP2 EXEC PGM=IEFBR14 //DD1 DD DSN=&&TEMP,SPACE=(TRK,(1,1)), // DCB=(RECFM=FB,BLKSIZE=800,LRECL=80), // DISP=(NEW,KEEP),UNIT=SYSDA // PEND //STEP1 EXEC PROC1 //

21 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 CATALOGED PROCEDURE 1.It must be a member of PDS 2.PEND statement is not mandatory 3.It can have a maximum of 255 steps 4.The name of the library (PDS) should be specified if cataloged library is not in the system defined library (SYS1.PROCLIB) using JES JOBPARM statement or JCLLIB statement

22 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 JCLLIB Specifies the names of the private libraries the system has to search for: a) Procedures named on any EXEC statement b) JCL referenced by the INCLUDE statement (after release 4) ex: // INCLUDE MEMBER=MYJCL The JCLLIB statement must be placed before the first EXEC statement in the job // JCLLIB ORDER=(library[,library]....) // JCLLIB ORDER=(MYPROC.JCL.PROCLIB, // MYPROC.JCL.PROCLIB1)

23 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Cataloged procedure It must begin with a PROC statement and PEND is optional. It must be cataloged in order to access it that is it must be a member of a PDS. //ER5077J JOB,ABC, CLASS=A // JCLLIB ORDER=(ER5077.PROCLIB) //STEP1 EXEC MYPROC //MYPROC PROC //STEP2 EXEC PGM=IEFBR14 //DD1 DD DSN=&&TEMP,SPACE1(TRK,(1,1)), // DCB=(RECFM=FB,BLKSIZE=800,LRECL=80), // DISP=(NEW,KEEP),UNIT=SYSDA Cataloged procedure : Cataloged procedure called through a JCL :

24 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Questions ?? If a JCL has two procedures, an instream procedure first and a cataloged procedure next with the same name, which one will be executed ? //ER5077J JOB,,NOTIFY=&SYSUID,CLASS=A //JCLLIB ORDER=(ER4857.PROCLIB) //MYPROC PROC //STEP1 EXEC PGM=IEFBR14 //DD1 DD DSN=ER5077.TEST.CAT,SPACE=(TRK,(1,1)), // DCB=(RECFM=FB,BLKSIZE=800,LRECL=80), // DISP=(NEW,DELETE),UNIT=SYSDA // PEND //STEP1 EXEC MYPROC //* Answer : The Instream procedure will be executed

25 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Questions ?? If a JCL has two procedures, a cataloged procedure first and an instream procedure next with the same name which one will be executed ? //ER5077J JOB,,NOTIFY=&SYSUID,CLASS=A // JCLLIB ORDER=(ER5077.PROCLIB) //STEP1 EXEC MYPROC //MYPROC PROC //STEP1 EXEC PGM=IEFBR14 //DD1 DD DSN=ER5077.TEST.CAT,SPACE=(TRK,(1,1)), // DCB=(RECFM=FB,BLKSIZE=800,LRECL=80), // DISP=(NEW,DELETE),UNIT=SYSDA // PEND //* Answer : Cataloged procedure will be executed

26 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Nested Procedures  Cataloged and In-stream procedure can invoke other procedure ( up to 15 level)  An In-stream procedure cannot be defined within another procedure

27 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Nested Procedures (examples) //ER5077J JOB,,NOTIFY=ER4857,CLASS=A //LIB1 JCLLIB ORDER=(ER5077.JCL.SOURCE) //FSTPROC PROC //STEP1 EXEC MYPROC // PEND //SNDPROC PROC //STEP1 EXEC FSTPROC // PEND //STEP1 EXEC SNDPROC //* SNDPROC is called first which calls FSTPROC which initiates cataloged procedure MYPROC

28 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Nested Procedures NSTPROC //NSTPROC PROC //STEP1 EXEC PGM=IEFBR14 MYPROC //MYPROC PROC //STEP1 EXEC NESTPROC //STEP2 EXEC PGM=IEFBR14,COND=(0,NE) //DD1 DD DSN=&&TEMP,SPACE=(TRK,(1,1)), // DCB=(RECFM=FB,BLKSIZE=800,LRECL=80), // VOL=SER=INUSR3, // DISP=(NEW,KEEP),UNIT=SYSDA CALLJCL //ER5077J JOB,,NOTIFY=&SYSUID,CLASS=A // JCLLIB ORDER=(ER5077.PROCLIB) //STEP1 EXEC MYPROC

29 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Modifying the Procedure SYMBOLIC PARAMETERS OVERRIDING EXEC & DD PARAMETERS

30 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Symbolic Parameters Symbolic parameters are variables used in procedures Syntax - &Varname Varname character Value can be specified at : 1) SET statement 2) EXEC PROC statement 3) PROC statement

31 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Symbolic Parametersexamples... //ER5077J JOB,,CLASS=A //SET1 SET A=ER5077.PDS.SAMPLE //STEP1 EXEC PGM=IEFBR14 //DD1 DD DSN=&A,SPACE=(TRK,(1,1)), // DCB=(RECFM=FB,BLKSIZE=800,LRECL=80), // DISP=(NEW,DELETE),UNIT=SYSDA

32 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Symbolic Parametersexamples... //ER5077J JOB,, CLASS=A //MYPROC PROC A=ER5077.PDS.SAMPLE //STEP2 EXEC PGM=IEFBR14 //DD1 DD DSN=&A,SPACE=(TRK,(1,1)), // DCB=(RECFM=FB,BLKSIZE=800,LRECL=80), // DISP=(NEW,DELETE),UNIT=SYSDA // PEND //STEP1 EXEC MYPROC

33 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 REFERING BACK //ER5077J JOB,,NOTIFY=&SYSUID,CLASS=A //STEP1 EXEC PGM=IEFBR14 //DD1 DD DSN=ER5077.TEST.PS1,SPACE=(TRK,(1,1)), // DCB=(RECFM=FB,BLKSIZE=800,LRECL=80), // DISP=(NEW,DELETE),UNIT=SYSDA //DD2 DD DSN=ER5077.TEST.PS2,SPACE=(TRK,(1,1)), // DCB=*.DD1,VOL=SER=INUSR3, // DISP=(NEW,DELETE),UNIT=SYSDA

34 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 REFERING BACK //ER5077J JOB,ABC,NOTIFY=&SYSUID,CLASS=A //STEP1 EXEC PGM=IEFBR14 //DD1 DD DSN=ER5077.TEST.PS1,SPACE=(TRK,(1,1)), // DCB=(RECFM=FB,BLKSIZE=800,LRECL=80), // DISP=(NEW,CATLG),UNIT=SYSDA //STEP2 EXEC PGM=IEFBR14 //DD1 DD DSN=*.STEP1.DD1,SPACE=(TRK,(1,1)), // DCB=*.STEP1.DD1,VOL=SER=INUSR3, // DISP=(OLD,DELETE),UNIT=SYSDA

35 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 IBM UTILITY PROGRAMS Provides a variety of useful function like  Copying a member/data set  Listing  Maintaining source libraries etc. MVS provides a number of pre-written utility programs that can be used by analysts, system programmers, and application programmers to assist them in maintaining and organizing data.

36 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 UTILITY PROGRAMS SYSTEM UTILITY IEHLIST IEHMOVE IEHINITT IEHPROGM IFHSTATR DATA SET UTILITY IEBGENER IEBCOPY IEBCOMPR IEBPTPCH IEBDG IEBUPDTE IEBMOVE IEBEDIT IDCAMS IEFBR14

37 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 GENERAL FORMAT FOR IEBXXXX //STEP EXEC PGM=IEBxxxx //SYSPRINT DD (message data set,no DCB) //SYSIN DD (Control information for utility) //SYSUT1 DD (input data set) //SYSUT2 DD (output dataset)

38 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 IEBGENER utility It is used to copy one sequential file to another. //ER5077J JOB,ABC,CLASS=A,NOTIFY=&SYSUID //STEP1 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSUT2 DD DSN=ER5077.IEBGENER.NEWPS, // VOL=SER=INUSR2,SPACE=(TRK,(1,1)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=800), // DISP=(NEW,CATLG) //SYSUT1 DD DSN=ER5077.INPUT.JCLPS1,DISP=SHR //SYSIN DD DUMMY

39 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 IEBCOPY To copy PDS on to DASD To copy PDS on to Tapes by converting it to sequential dataset etc //ER5077J JOB,,CLASS=A,NOTIFY=ER5077 //STEP1 EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=A //SYSUT1 DD DSN=ER5077.JCL.SOURCE,DISP=SHR //SYSUT2 DD DSN=ER5077.IEBCOPY.PDS, // VOL=SER=INUSR2,SPACE=(TRK,(5,5,8)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=800), // DISP=(NEW,CATLG) //SYSIN DD * COPY INDD=SYSUT1,OUTDD=SYSUT2 /*

40 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 IEFBR14 Using IEFBR14 you can create empty data sets or delete data sets Allocate new flat files //ER5077J JOB,,CLASS=A,NOTIFY=&SYSUID //STEP1 EXEC PGM=IEFBR14, //DD1 DD DSN=ER5077.JCL.PS,DISP=(NEW,CATLG,DELETE), // UNIT=SYSDA, SPACE=(CYL(2,2),RLSE), // DCB=(LRECL=80,BLKSIZE=0,RECFM=FB) //SYSPRINT DD SYSOUT=*

41 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 SORT This can be used to sort, copy, merge data sets To SORT records in a dataset in ascending/descending order on given field(s) //STEP1 EXEC PGM=SORT //SYSPRINTDD SYSOUT=* //SORTINDD DSN=input data set,DISP=SHR //SORTOUTDDDSN=output data set, //DISP=(,CATLG), //DCB=*.SORTIN, //SPACE=(CYLS,(10,10),RLSE) //* //************* //* SORT CARD : //************* //SYSIN DD * SORT FIELDS=(1,05,CH,A), //*

42 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Review Questions  Instream procedure could be member of a PDS? NO  A Catalogued procedure can call an Instream procedure? NO  Which type of parameters are used to customize the procedure? Symbolic  Catalogued procedure can invoke other procedures beyond 20 levels? No. Till 15 Levels.

43 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Thank You!