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.

Slides:



Advertisements
Similar presentations
Stephen Linkin Houston Community College 3/21/2007 © Mike Murach & Associates, HCC, IBM 1 Managing Generation Data Groups.
Advertisements

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.
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.
2-1 Chapter 2.  Coding Requirements of IDENTIFICATION DIVISION  Sections of ENVIRONMENT DIVISION  Assigning Files to Devices in ENVIRONMENT DIVISION.
Chapter 3 Loaders and Linkers
5/2/ ER/CORP/CRS/OS02/003-1 Job Control Language Bhargava KC Extension: E&R Rotunda, II Floor, Cubicle 15
C++ Programming: Program Design Including Data Structures, Fourth Edition Chapter 15: Exception Handling.
Chapter 16: Exception Handling C++ Programming: From Problem Analysis to Program Design, Fifth Edition.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 16: Exception Handling.
Reserved Names. //TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP) DDNAME - one to eight alphanumeric characters. The first character must be alphabetic.
Introduction of z/OS Basics © 2006 IBM Corporation Chapter 5: Working with data sets.
Introduction to z/OS Basics © 2006 IBM Corporation Chapter 6: Using Job Control Language (JCL) and System Display and Search Facility (SDSF)
Chapter 8: I/O Streams and Data Files. In this chapter, you will learn about: – I/O file stream objects and functions – Reading and writing character-based.
Chapter 5: Working with data sets
Chapter 6 AN INTRODUCTION TO FILES AND FILE PROCESSING Dr. Ali Can Takinacı İstanbul Technical University Faculty of Naval Architecture and Ocean Engineering.
Stephen Linkin Houston Community College January 15, 2007 © Mike Murach & Associates, HCC, IBM 1 Introduction To IBM Mainframe Systems Chapter.
VSAM KSDS and COBOL Department of Computer Science Northern Illinois University August 2005 Some of the illustrations are from VSAM: Access Method Services.
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.
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
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.
Chapter 6: User-Defined Functions
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.
CA TLMS. CA TLMS VMF Step by step guide to adding and deleting volume ranges.
File Systems CSCI What is a file? A file is information that is stored on disks or other external media.
1 Interactive vs Batch Programs Cobol suited for developing both types of programs Interactive programs Accept input data from keyboard Input data processed.
6 Memory Management and Processor Management Management of Resources Measure of Effectiveness – On most modern computers, the operating system serves.
Stephen Linkin Houston Community College 21-Feb-07 © Mike Murach & Associates, HCC, IBM 1 Using JCL Procedures.
Chapter 7 File I/O 1. File, Record & Field 2 The file is just a chunk of disk space set aside for data and given a name. The computer has no idea what.
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.
Chapter 9 I/O Streams and Data Files
Device Drivers CPU I/O Interface Device Driver DEVICECONTROL OPERATIONSDATA TRANSFER OPERATIONS Disk Seek to Sector, Track, Cyl. Seek Home Position.
CPSC3111/CISM3111 COBOL Structured COBOL Programming Text: murach’s structured COBOL Authors: Murach, Prince, Menendez.
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.
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.
1 The Data Division. 2 Main Two Sections File Section –Used to define files and record formats –Field names within records Working Storage Section –All.
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.
Structured COBOL Programming, Stern & Stern, 9th Edition CHAPTER 2 Cobol Language Fundamentals.
Introduction to z/OS Basics © 2006 IBM Corporation Chapter 7: Batch processing and the Job Entry Subsystem (JES) Batch processing and JES.
Chapter 15: Exception Handling C++ Programming: Program Design Including Data Structures, Fifth Edition.
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 /
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the basic properties and characteristics of external files ❏ To.
HORIZONT XINFO – Scanner zOS – JCL1 HORIZONT XINFO – Scanner zOS – JCl.
Cloning Flow for
Chapter 7 Text Input/Output Objectives
Chapter 7 Text Input/Output Objectives
Chapter 7 Text Input/Output Objectives
XINFO – Scanner z/OS – JCL
JOB CONTROL LANGUAGE IDC Training Centre.
Batch Processing, JCL and SDSF
DB2.
Machine Independent Features
Chapter 3 The DATA DIVISION.
JCL Standards #3 Company Name
Overview of VSAM and Defining a Cluster
Presentation transcript:

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. – Notifies the operating system that a data set is to be either accessed or created. – Identifies the device requirements of the data set: Type of I/O unit required. Specific volumes to be mounted on the unit.

//TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP) The DD Statement: – Further defines characteristics of the data set The length of each record; The format of the record; Whether the data set already exists or is to be created during the job step. – Specifies what is to be done with the data set when the job completes.

Tape DD Statement

//TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP) DDNAME - one to eight alphanumeric characters. The first character must be alphabetic. The DDNAME comes from the External Reference name in the SELECT Clause of the ENVIRONMENT DIVISION of a COBOL program.

INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT CARD-FILE ASSIGN UR-2540R-S-CARDIN. SELECT PRINT-FILE ASSIGN UR-3203-S-PRTFLE. SELECT TAPE-IN ASSIGN UT-3420-S-TPEIN. SELECT TAPE-OUT ASSIGN UT-3420-S-TPEOUT. SELECT DISK-IN ASSIGN DA-3375-S-DSKIN. SELECT DISK-OUT ASSIGN DA-3375-S-DSKOUT. DATA DIVISION. 01 CARD-FILE. 05 EMP-NO PIC X(5) 05 EMP-NAME. 10 EMP-LAST PIC X(25). 10 EMP-FIRST PIC X(25). 10 EMP-MIDDLE PIC X.

//TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP) DD – Operation - Data Definition

//TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP) UNIT - Identifies the data set as a tape file

//TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP) DSN (DSNAME) – Data Set Name Identifies the name of the file as recorded in the header label when the file was created.

Fig. 12.4: The UNIT parameter specifies a physical device.

//TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP), // VOL=SER=2992 DISP - Identifies the status of the data set: Subparameter 1 - at the beginning of the job step; Subparameter 2 - If the job step terminates normally; Subparameter 3 - If the job step terminates abnormally.

Fig. 12.6: The disposition (DISP) parameter specifies the file’s status.

//TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP), // VOL=SER=2992 DISP - Identifies the status of the data set: Subparameter 1 - at the beginning of the job step;

//TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP) NEW,DELETE,DELETE SHR, PASS,CATLG,CATLG,UNCATLG,UNCATLG, OLD - The data set was created in an earlier job or job step. NEW - The data set is being created in the current job step.

//TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP), // VOL=SER=2992 DISP - Identifies the status of the data set: Subparameter 2 - If the job step terminates normally;

//TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP) NEW,DELETE,DELETE SHR, PASS,CATLG,CATLG,UNCATLG,UNCATLG, KEEP - The data set is to be saved for future use. DELETE - The data set is scratched. PASS - The data set will remain mounted. CATLG - The data set cataloged to the Tape Library. UNCATLG - The data set is uncataloged from the Tape Library.

//TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP), // VOL=SER=2992 DISP - Identifies the status of the data set: Subparameter 3 - If the job step terminates abnormally.

//TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP) NEW,DELETE,DELETE SHR, PASS,CATLG,CATLG,UNCATLG,UNCATLG, KEEP - The data set is to be saved for future use. DELETE - The data set is scratched. CATLG - The data set cataloged to the Tape Library. UNCATLG - The data set is uncataloged from the Tape Library.

Common sense dictates: //TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP)

Common sense dictates: //TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(NEW,CATLG,DELETE)

//TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP), // VOL=SER=

//TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP), // DCB=(RECFM=FB,LRECL=300,BLKSIZE=600) DCB Parameter - supplies data set characteristics to be included in the data control block. – RECFM – Record Format – LRECL – Logical Record Length – BLKSIZE – Block Size 22

Fig. 12.5: The DCB parameter. The DSORG, MACRF, and DDNAME must be coded in the program DCB.

Disk DD Statement

//DISKIN DD UNIT=DISK,DSN=PR.FLE, SYSDA

UNIT - Identifies the data set as a disk file

//DISKIN DD UNIT=DISK,DSN=PR.FLE, SYSDA &&PR.FLE DSN (DSNAME) – – Data Set Name – Identifies the name of the file as recorded in the header label when the file was created. – && used to indicate a temporary data set

Fig. 12.7: The SPACE parameter.

//DISKOUT DD UNIT=DISK,DSN=PR.FLE, SYSDA // SPACE=(TRK,(10,10),RLSE,CONTIG), CYL, BLKSIZE, // DISP=(NEW,CATLG,DELETE) Type of space allocation – Primary Allocation – Secondary Allocation Release Any Unused Space All Space Must Be Contiguous

//DISKIN DD UNIT=DISK,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP) NEW,DELETE,DELETE SHR, PASS,CATLG,CATLG,UNCATLG,UNCATLG, OLD - The data set was created in an earlier job or job step. NEW - The data set is being created in the current job step. SHR - The input data set will be shared by another job.

//SYSIN DD * Allows a file to be inputted via the system’s default input device. The asterisk indicates that the data follows this DD statement. 31

//SYSOUT DD SYSOUT=A Allows a file to be outputted to the system’s default output device. Normally implies printer output. The value of SYSOUT is dependent upon your installation. 32

//DISKIN DD DUMMY Allows a file to be ignored, or dummyed out. This process will be allowed as long as the logic of the program will allow the file to be dummyed out. 33

//DISKIN DD UNIT=DISK,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP), 34

CONCATENATING DATA SETS // INDATA DD DSN=CURORDR,UNIT=TAPE, // VOL=SER=K90221, // DISP=(OLD,KEEP,KEEP) // DD DSN=PREVORDR,UNIT=AFF=INDATA, // VOL=SER=14552,DISP=(OLD,KEEP,KEEP) // DD DSN=INV,UNIT=AFF=INDATA, // VOL=SER=866221,DISP=(OLD,KEEP,KEEP)

Data Control Block Table As the Job Stream JCL is checked, the information in the DD statements is used to create an entry for the data sets in the DCB Table. Once the DCB Table is completed, the JCL is then checked for accuracy and validity. If any errors are discovered, they are documented on the JCL Listing (MSGLEVEL parameter) and the job is not run.

Backward References Using the DCB Table entries, Backward References (Refer Backs) can take place.

Backward References //OSJCL JOB (OSJCL,’04/03/98’),’M. R. IZZO’, // CLASS =T,MSGLEVEL=(1,1), // MSGCLASS =A //STEP1 EXEC PGM=CALC //DD1 DD UNIT=TAPE,DSN=FILE1, // DISP=(OLD,KEEP,KEEP) //DD2 DD UNIT=TAPE,DSN=FILE2, // DISP=(OLD,KEEP,KEEP) //DD3 DD UNIT=TAPE,DSN=FILE3, // DISP=(NEW,PASS,DELETE) 38

//REPORT DD SYSOUT=A //SYSUDUMP DD SYSOUT=J //CRDIN DD * * Card Input * /* //STEP2 EXEC PGM=CALC2 //DD4 DD UNIT=TAPE,DSN=*.STEP1.DD3, // DISP=(OLD,KEEP,KEEP) //REPORT2 DD SYSOUT=A //SYSUDUMP DD SYSOUT=J //

DCB Table STEP NAMEDD NameDSNUNITRECFMTDISP STEP 1DD1FILE1TAPEOld, Keep Keep DD2FILE2TAPEOld Keep Keep DD3FILE3TAPENew Pass Delete REPORTSYSOUT=A SYSUDUMPSYOUT=J CRDIN* STEP2DD4 *.STEP1.DD3 TAPE

DCB Table STEP NAMEDD NameDSNUNITRECFMTDISP STEP 1DD1FILE1TAPEOld, Keep Keep DD2FILE2TAPEOld Keep Keep DD3FILE3TAPENew Pass Delete REPORTSYSOUT=A SYSUDUMPSYOUT=J CRDIN* STEP2DD4FILE3TAPENew Pass Delete

DCB Table STEP NAMEDD NameDSNUNITRECFMTDISP STEP 1DD1FILE1TAPEOld, Keep Keep DD2FILE2TAPEOld Keep Keep DD3FILE3TAPENew Pass Delete REPORTSYSOUT=A SYSUDUMPSYOUT=J CRDIN* STEP2DD4FILE3TAPE OLD,KEEP,KEEP

DCB Table STEP NAMEDD NameDSNUNITRECFMTDISP STEP 1DD1FILE1TAPEOld, Keep Keep DD2FILE2TAPEOld Keep Keep DD3FILE3TAPENew Pass Delete REPORTSYSOUT=A SYSUDUMPSYSOUT=J CRDIN* STEP2DD4FILE3TAPENew Keep Keep REPORT2SYSOUT=A SYSUDUMPSYSOUT=J

DCB Table STEP NAMEDD NameDSNUNITRECFMTDISP STEP 1DD1FILE1TAPEOld, Keep Keep DD2FILE2TAPEOld Keep Keep DD3FILE3TAPENew Pass Delete REPORTSYSOUT=A SYSUDUMPSYSOUT=J CRDIN* STEP2DD4FILE3TAPEOld Keep Keep REPORT2SYSOUT=A SYSUDUMPSYSOUT=J

Compiler Return Codes Level W - Warning - Return Code 4 Level C - Condition - Return Code 8 Level E - Errors - Return Code 12 Level F - Fatal - Return Code 16 45

Compile, Link, & Execute //OSJCL JOB (OSJCL,’04/03/98’),’M.R.IZZO’, // CLASS=T,MSGLEVEL=(1,1), // MSGCLASS=A //COB EXEC PGM=IKFCBL00,PARM=‘LOAD’ //SYSPRINT DD SYSOUT=A //SYSUT1 DD UNIT=SYSDA, // SPACE=(460,(700,100)) //SYSUT2 DD UNIT=SYSDA, // SPACE=(460,(700,100)) 46

//SYSUT3 DD UNIT=SYSDA, // SPACE=(460,(700,100)) //SYSUT4 DD UNIT=SYSDA, // SPACE=(460,(700,100)) //SYSLIN DD DSNAME=&&LOADSET, // DISP=(MOD,PASS,DELETE), // UNIT=SYSDA,SPACE=(80,(500,100)) //SYSIN DD * * * Source Input /* 47

//LKED EXEC PGM=IEWL, // PARM=(‘LIST,XREF,LET’), // COND=(5,LT,COB) //SYSLIN DD DSN=&&LOADSET, // DISP=(OLD,DELETE,KEEP) //SYSLMOD DD DSN=&&GOSET(GO), // DISP=(NEW,PASS,DELETE), // UNIT=SYSDA, // SPACE=(1024,(50,20,1)) //SYSUT1 DD UNIT=SYSDA, // SPACE=(1028,(50,20)) //SYSPRINT DD SYSOUT=A 48

//GO EXEC PGM=*.LKED.SYSLMOD, // COND=((5,LT,COB),(5,LT,LKED)) //TPEIN DD UNIT=TAPE,DSN=PR.FLE, // DISP=(OLD,KEEP,KEEP), // DCB=(RECFM=FB,LRECL=150), // DCB=(BLKSIZE=300), // VOL=SER=00978 //TPEOUT DD UNIT=TAPE,DSN=PR.FLE, // DISP=(NEW,CATLG,DELETE), // DCB=(RECFM=FB,LRECL=150), // DCB=(BLKSIZE=300) 49

//DSKIN DD UNIT=DISK,DSN=PR.TRANS, // DISP=(OLD,KEEP,KEEP), // DCB=(RECFM=FB,LRECL=200), // DCB=(BLKSIZE=400) //DSKOUT DD UNIT=DISK,DSN=ED.PR.TRANS, // DISP=(NEW,CATLG,DELETE), // SPACE=(TRK,(10,5),RLSE) //PRT DD SYSOUT=A //SYSUDUMP DD SYSOUT=A //CRDIN DD * * * Card Input /* // 50

Fig. 12.1: One data control block is coded for each file accessed by a program.

Fig. 12.2: The linkage editor adds an access method to the load module.

Fig. 12.3: The link to a specific physical device is established at OPEN time.

Magnetic Disk Parameters UNIT DCB DISP DSNAME VOLUME SPACE

Fig. 12.8: Some examples.

Fig. 12.8: Some Examples

Magnetic Tape Parameters UNIT DCB DISP DSNAME VOLUME LABEL

System Input and Output Spooling -- slower devices System input device – //SYSIN DD * System output device – //SYSOUT DD SYSOUT=A

Fig. 12.9: The DDNAME can be qualified if it is part of a catalogued procedure.

Fig : Code the library member name as part of the DDNAME.

Fig : A complete set of JCL to support an assemble, link edit, and go job.

Fig : Continued