0% found this document useful (0 votes)
77 views25 pages

Introduction To The New Mainfame: Chapter 4: Working With Data Sets

A data set is a collection of logically related data records stored on one disk. Z / OS uses a direct access storage device (DASD), magnetic tape volume, or optical media. You can use one DASD volume for many different data sets, and reallocate space.

Uploaded by

manne_sangeeth
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views25 pages

Introduction To The New Mainfame: Chapter 4: Working With Data Sets

A data set is a collection of logically related data records stored on one disk. Z / OS uses a direct access storage device (DASD), magnetic tape volume, or optical media. You can use one DASD volume for many different data sets, and reallocate space.

Uploaded by

manne_sangeeth
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Introduction to the new mainfame Chapter 4: Working with data sets

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

Chapter 4 objectives
Be able to:

Explain what a data set is Describe data set naming conventions and record formats List some access methods for managing data and programs Explain what catalogs and VTOCs are used for Be able to create, delete, and modify data sets

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

Key terms in this chapter


block size catalog data set high level qualifier or HLQ library logical record length or LRECL member PDS and PDSE record format or RECFM system managed storage or SMS virtual storage access method or VSAM VTOC

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

What is a data set? A data set is a collection of logically related data records stored on one disk storage volume or a set of volumes. A data set can be:
a source program a library of macros a file of data records used by a processing program.

You can print a data set or display it on a terminal. The logical record is the basic unit of information used by a program running on z/OS.

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

How data is stored in a z/OS system Data is stored on a direct access storage device (DASD), magnetic tape volume, or optical media. You can store and retrieve records either directly or sequentially. You use DASD volumes for storing data and executable programs, including the operating system itself, and for temporary working storage. You can use one DASD volume for many different data sets, and reallocate or reuse space on the volume.

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

Data management in z/OS Data management involves all of the following tasks:
allocation, placement, monitoring, migration, backup, recall, recovery, and deletion.

Storage management is done either manually or through automated processes (or through a combination or both). In z/OS, DFSMS is used to automate storage management for data sets.

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

What an access method is Defines the technique used to store and retrieve data. Includes system-provided programs and utilities to define and process data sets. Commonly used access methods include the following:
VSAM, QSAM, BSAM, BDAM, and BPAM.

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

DASD: Use and terminology Direct Access Storage Device (DASD) is another name for a disk drive. DASD volumes are used for storing data and executable programs. Data sets in a z/OS system are organized on DASD volumes.
A disk drive contains cylinders Cylinders contain tracks Tracks contain data records.

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

Using a data set To use a data set, you first allocate it. Then, access the data using macros for the access method that you have chosen. Various ways to allocate a data set:
ISPF panel option 3.2. Access Method Services TSO ALLOCATE command job control language (JCL).

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

Allocating space on DASD volumes How space is specified:


explicitly (SPACE parameter) implicitly (SMS data class). Smallest amount of data to be processed Grouped in physical records named blocks Space for a disk data set is assigned in extents.

Logical records and blocks: Data set extents:

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

Data set record formats


F
record record record record Fixed records. block block record record record record

FB

record

record

Fixed blocked records. BLKSIZE = n * LRECL

V
RDW

record

record

record

Variable records. block block record


record

VB
BDW

record

record

record

Variable blocked records. BLKSIZE >= 4 + n * lragest LRECL record


record

record

record

Undefined records. No defined internal structure for access method. Record and block descriptors words are each 4 bytes long
Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

Types of data sets We discuss three types in this class:


Sequential, partitioned, and VSAM

A PDS is a collection of sequential data sets, called members.


Consists of a directory and one or more members. Also called a library.

A PDSE is a partitioned data set extended.

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

PDS versus PDSE PDS data sets:


Simple and efficient way to organize related groups of sequential files.

PDSE data sets:


Similar in some ways to a PDS, but advantages include:
Space reclaimed automatically when a member is deleted Flexible size Can be shared Faster directory searches

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

What is a data set, and how is it stored


Sequential Data Set DASD Partitioned and Sequential
Record 1 Record 2 Record 3 Record 4 etc ...

Directory

Partitioned Data Set


Entry for JCOPY Entry for COMPJCL Entry for SORT1

JCOPY

Previously used space recoverable by compress utility

COMP JCL SORT1

Available space
Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

VSAM VSAM is Virtual Storage Access Method VSAM provides more complex functions than other disk access methods VSAM record formats:
Key Sequence Data Set (KSDS) Entry Sequence Data Set (ESDS) Relative Record Data Set (RRDS) Linear Data Set (LDS)

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

Simple VSAM control interval

R1

R2

R3

free space in CI

R D F

R D F

R D F

CI D F

Record Descriptor Fields

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

How data sets are named Data set naming convention


Unique name Maximum of 22 name segments: level qualifier
The first name in the left: high level qualifier (HLQ) The last name in the right: low level qualifier (LLQ) Level qualifiers are separated by '.' From 1 up to 8 characters The first must be alphabetical (A-Z) or special (@ # $) The 7 remaining: alphabetical, national, numeric (0-9) or hyphen (-) Upper case only Maximum 44 characters

Each level qualifier:

Example: MYID.JCL.FILE2 HLQ: MYID 3 qualifiers

Member name of partitioned data set

8 bytes First byte: alphabetical (A-Z) or special (@ # $) The 7 remaining: alphabetical, special, numeric (0-9)
Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

Catalogs and VTOCs z/OS uses a catalog and a volume table of contents (VTOC) on each DASD to manage the storage and placement of data sets. VTOC:
Lists the data sets on a volume Lists the free space on the volume.

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

VTOC
LABEL (volser)
VTOC MY.DATA YOUR.DATA

free space

tracks

tracks

tracks

Extents

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

How a catalog is used A catalog associates a data set with the volume on which the data set is located. Locating a data set requires:
Data set name Volume name Unit (volume device type)

Typical z/OS system includes a master catalog and numerous user catalogs.

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

Catalog Structure

SYSTEM.MASTER.CATALOG Master Catalog Data Set-SYS1.A1 or HLQs (alias) IBMUSER...USER

USERCAT.IBM User Catalog

USERCAT.COMPANY User Catalog Data Set with HLQ=USER

Data Set with HLQ=IBMUSER

Catalog Structure

volume (wrk002) unit (3390)

volume (wrk001) unit (3390) IBMUSER.A1 USER.A1 SYS1.A1 volume (012345) unit (tape) USER.TAPE.A1

IBMUSER.A2 IBMUSER.A3

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

z/OS UNIX file systems z/OS UNIX System Services (z/OS UNIX) allows z/OS to access UNIX files. A z/OS UNIX file system is hierarchical and byte-oriented. Files in the UNIX file system are sequential files and are accessed as byte streams. UNIX files and traditional z/OS data sets can reside on the same DASD volume.

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

UNIX file system structure


Directory

Directory

Directory

Directory
File File File File

Directory
File File File File File File File File

Directory
File File File

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

Summary A data set is a collection of logically related data (programs or files) Data sets are stored on disk drives (DASD) and tape. Most z/OS data processing is record-oriented. Byte stream files are not present in traditional processing, except in z/OS UNIX. z/OS records follow well-defined formats, based on record format (RECFM), logical record length (LRECL), and the maximum block size (BLKSIZE). z/OS data set names have up to 44 characters, divided by periods into qualifiers.

Copyright IBM Corp., 2005. All rights reserved.

Introduction to the new mainframe

Summary (continued) Catalogs are used to locate data sets. VSAM is an access method that provides more complex functions than other disk access methods. z/OS libraries are known as partitioned data sets (PDS or PDSE) and contain members. A file in the hierarchical file system can be either a text file or a binary file. z/OS treats an entire UNIX file system hierarchy as a collection of data sets. Each data set is a mountable file system.

Copyright IBM Corp., 2005. All rights reserved.

You might also like