Introduction to zOS Data Sets Disk VTOC Master





















































































- Slides: 85

Introduction to z/OS Data Sets, Disk VTOC, Master Catalog & User Catalogs © Copyright IBM Corp. , 2008. All rights reserved.

Introduction to System z Operating System – z/OS What is a data set? Ø Commonly known as a file in unix or linux. Ø 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. 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 2

Introduction to System z Operating System – z/OS How data is stored in a z/OS system Ø Data is stored on a disk storage volume, magnetic tape, or optical media. Ø Programs and system utilities can store and retrieve records either directly or sequentially. Ø Programs and system utilities use disk volumes for storing data and executable programs, including the operating system itself, and for temporary working storage. Ø Program and system utilities can use one disk volume for many different data sets, and reallocate or reuse space on the volume. 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 3

Introduction to System z Operating System – z/OS Data management in z/OS Ø Data management involves all of the following tasks: § allocation, placement, monitoring, migration, backup, recall, recovery, and deletion. Ø Disk storage management is done either explicitly or through automated processes (or through a combination or both). Ø In z/OS, DFSMS (Data Facility Storage Management Subsystem) is a base component of the operating system and it can be used to automate storage management for data sets. 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 4

Introduction to System z Operating System – z/OS DASD: Use and terminology Ø Direct Access Storage Device (DASD) is another name for a disk volume. Ø 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. 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 5

Introduction to System z Operating System – z/OS What is a data access method? Ø 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: § Virtual Storage Access Method ü VSAM § Sequential and Partition Access Methods (aka non VSAM) ü BSAM, BPAM and QSAM § Other speciality access methods (aka non VSAM) ü BDAM, HIDAM, HISAM 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 6

Introduction to System z Operating System – z/OS Data Sets – Common Types of z/OS Data Sets Ø Non-VSAM 1. SEQ Sequential collection of records referenced by a single data set name 2. PDS Partitioned Data Set (aka PO – Partitioned Organization) Consists of a directory and one or more member names 3. PDS/E Partitioned Data Set Extended Consists of a directory and one or more member names Increased Functionality, Performance and Reduced Maintenance Ø VSAM – Increased efficiency and performance beyond non-VSAM 1. KSDS Keyed Sequential Data Set 2. ESDS Entry Sequential Data Set 3. RRDS Relative Record Data Set 4. LDS Linear Data Set 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 7

Introduction to System z Operating System – z/OS Data Set – Space Allocation Ø How space is specified: § explicitly (JCL, ALLOCATE, SVC 99, IDCAMS) § implicitly (DFSMS – Automatic Selection Criteria, ACS routine) Ø Non VSAM Data Set characteristics: § Smallest amount of data to be processed is a logical record § Records can be grouped into blocks Ø VSAM Data Set characteristics: § Records are stored in control intervals (1 exception – LDS) Ø How Data Sets are Created on Disk Storage: § A Data Set is assigned disk space in chunks called extents § A primary extent is allocated when data set is created. § A secondary extent is created/allocated when primary extent is full 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 8

Introduction to System z Operating System – z/OS Data Set – (non VSAM) data storage attributes F record Fixed records. FB block record record Fixed blocked records. BLKSIZE = n * LRECL V record Variable records. RDW block VB BDW U block record record Variable blocked records. BLKSIZE >= 4 + n * largest LRECL record Undefined records. No defined internal structure for access method. Record and block descriptors words are each 4 bytes long 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 9

Introduction to System z Operating System – z/OS Data Set – PDS and PDS/E (non VSAM) Ø PDS data sets: • Simple and efficient way to organize related groups of sequential files. Ø PDS/E data sets: • Similar to a PDS, but advantages include: • Space reclaimed automatically when a member is deleted • Faster directory searches 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 10

Introduction to System z Operating System – z/OS Data Set Names - VSAM Ø A VSAM data set is accessed by a VSAM virtual data set name called a ‘cluster name’. Ø A VSAM cluster name is associated with 1 or more physical data set names. Ø A VSAM ESDS cluster includes a physical DATA component data set name. Ø A VSAM KSDS cluster includes a physical DATA component data set name and a physical INDEX component data set name and optionally a physical ALTERNATE INDEX component 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 11

Introduction to System z Operating System – z/OS Data Set – VSAM Virtual Storage Access Method VSAM data sets are formatted differently than non-VSAM data sets are collections of records, grouped into control intervals (CI) with one exception (LDS Linear Data Sets) The control interval (CI) is a fixed area of storage space in which VSAM stores records. The control intervals are grouped into contiguous areas of storage called control areas (CA). To access VSAM data sets, VSAM access method is used 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 12

Introduction to System z Operating System – z/OS Data Set – VSAM Virtual Storage Access Method VSAM arranges records by an index key, by a relative byte address, or by a relative record number. The following are the different types of VSAM data sets: 1. 2. 3. 4. Key Sequence Data Set (KSDS) Entry Sequence Data Set (ESDS) Relative Record Data Set (RRDS) Linear Data Set (LDS) A special system utility (IDCAMS) is used to define, delete, rename and copy VSAM data sets. 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 13

Introduction to System z Operating System – z/OS Data Set - VSAM KSDS – Keyed Sequence Data Set Contains records in order by a key field and can be accessed by the key or by a relative byte address. The key contains a unique value, such as an employee number or part number. 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 14

Introduction to System z Operating System – z/OS Data Set - VSAM ESDS – Entry Sequence Data Set Contains records in the order in which they were entered and can only be accessed by relative byte address. An ESDS is similar to a sequential data set. 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 15

Introduction to System z Operating System – z/OS Data Set - VSAM RRDS – Relative Record Data Set Contains records in order by relative-record number and can only be accessed by this number. Relative records can be fixed-length or variable-length. 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 16

Introduction to System z Operating System – z/OS Data Set - VSAM LDS – Linear Data Set Contains data that can be accessed as byte-addressable strings in virtual storage. A linear data set does not have imbedded control information that other VSAM data sets hold. You also can access linear data sets by using the z/OS data in virtual (DIV) access method or window services. Application programs can use DIV to map a data set (or a portion of a data set) into an address space, a data space, or a hiperspace. DB 2 table spaces containing DB 2 tables and DB 2 indexes are VSAM Linear Data Sets (LDS). 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 17

Introduction to System z Operating System – z/OS How data is stored and managed by VSAM 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 18

Introduction to System z Operating System – z/OS Data Set Names - (DSN) • Each cataloged data set must have an unique name ü Maximum 44 characters • 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 '. ‘ • Each level qualifier: ü 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 • Example: ZIBM 000. JCL HLQ: ZIBM 000 2 qualifiers 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 19

Introduction to System z Operating System – z/OS Data Set Names - Partitioned Data Set Member Names Ø Member name of partitioned data set (PDS) • 8 bytes long • First byte: alphabetical (A-Z) or special (@ # $) • The 7 remaining: alphabetical, special, numeric (0 -9) 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 20

Introduction to System z Operating System – z/OS Data Set Names 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 21

Introduction to System z Operating System – z/OS Data Set Names 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 22

Introduction to System z Operating System – z/OS Data Set Names 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 23

Introduction to System z Operating System – z/OS Data Set Names - Shift Right (F 11) 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 24

Introduction to System z Operating System – z/OS Data Set Names - Information 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 25

Introduction to System z Operating System – z/OS Data Set Names - Information 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 26

Introduction to System z Operating System – z/OS Data Set Names – Edit a Partitioned Data Set 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 27

Introduction to System z Operating System – z/OS Data Set Names – PDS members 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 28

Introduction to System z Operating System – z/OS Data Set Names – Edit mode 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 29

Introduction to System z Operating System – z/OS Data Set Names – Disk Volume View 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 30

Introduction to System z Operating System – z/OS Data Set Names – Disk Volume View 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 31

Introduction to System z Operating System – z/OS Data Set Names – DSLIST Panel 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 32

Introduction to System z Operating System – z/OS Data Set Names – DSLIST output Observe *VSAM* in Volume column 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 33

Introduction to System z Operating System – z/OS Data Set Names – LIST Catalog Entry (LISTC ENT) 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 34

Introduction to System z Operating System – z/OS Data Set Names – VSAM Information 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 35

Introduction to System z Operating System – z/OS Data Set Names – VSAM Information 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 36

Introduction to System z Operating System – z/OS Data Set Names – DB 2 Tablespace and DB 2 Index DB 2 Cluster or Data Component 2/27/2021 DB 2 Database Name DB 2 Tablespace or Index Name © Copyright IBM Corp. , 2008. All rights reserved. 37

Introduction to System z Operating System – z/OS Data Set Names - LISTC 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 38

Introduction to System z Operating System – z/OS Data Set Names – VSAM Information about DB 2 Tablespace 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 39

Introduction to System z Operating System – z/OS Data Set Names – DSLIST wildcards 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 40

Introduction to System z Operating System – z/OS Data Set Names – View mode 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 41

Introduction to System z Operating System – z/OS Data Set Names – View mode 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 42

Introduction to System z Operating System – z/OS Data Set Names – DSLIST wildcard help (F 1) 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 43

Introduction to System z Operating System – z/OS Catalog and VTOC Ø z/OS uses a catalog and a volume table of contents (VTOC) on each DASD volume to manage the storage and placement of data sets. Ø A catalog is a data set used to store location information about other data sets. Ø VTOC: • Lists the data sets on a volume • Lists the free space on the volume. *Note: Another special data set (VSAM Volume Data Set – VVDS) is stored on a disk volume which contains VSAM data sets. The VVDS entries include VSAM Volume Records (VVRs) to relate elements of a VSAM data set name. 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 44

Introduction to System z Operating System – z/OS VTOC 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 45

Introduction to System z Operating System – z/OS Catalog - What is a z/OS Catalog? Ø A catalog is a VSAM data set with information about other data sets. Ø Catalog records associate a data set name with disk or tape volume. Ø 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. Ø An ‘alias’ entry is defined in the master catalog to direct the master catalog to look into a specifically ‘related’ user catalog for the all data sets names beginning with that ‘alias’ (aka HLQ) as the first node of the data set name. 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 46

Introduction to System z Operating System – z/OS Catalog Structure 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 47

Introduction to System z Operating System – z/OS Catalog Structure 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 48

Introduction to System z Operating System – z/OS Catalog Structure 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 49

Introduction to System z Operating System – z/OS Catalog Structure 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 50

Introduction to System z Operating System – z/OS Catalog Structure – List Catalog Information 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 51

Introduction to System z Operating System – z/OS Catalog Structure – List Catalog Information 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 52

Introduction to System z Operating System – z/OS Catalog Structure – List Catalog Information 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 53

Introduction to System z Operating System – z/OS Catalog Structure – List Catalog Information 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 54

Introduction to System z Operating System – z/OS Catalog Structure – Define a User Catalog 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 55

Introduction to System z Operating System – z/OS Catalog Structure – Define an Alias in Master Catalog 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 56

Introduction to System z Operating System – z/OS Catalog Structure – ISPF Panel to Allocate Data Set 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 57

Introduction to System z Operating System – z/OS Catalog Structure – Allocate New Data Set 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 58

Introduction to System z Operating System – z/OS Catalog Structure – Allocate New Data Set 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 59

Introduction to System z Operating System – z/OS Catalog Structure – Allocate New Data Set 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 60

Introduction to System z Operating System – z/OS Catalog Structure 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 61

Introduction to System z Operating System – z/OS Catalog Structure 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 62

Introduction to System z Operating System – z/OS Catalog Structure 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 63

Introduction to System z Operating System – z/OS Catalog Structure SMS ACS routine – allocation based upon defined criteria 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 64

Introduction to System z Operating System – z/OS Catalog Structure 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 65

Introduction to System z Operating System – z/OS Catalog Structure 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 66

Introduction to System z Operating System – z/OS Catalog Structure 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 67

Introduction to System z Operating System – z/OS Catalog Structure 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 68

Introduction to System z Operating System – z/OS Catalog Structure – Using Ditto to View VTOC 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 69

Introduction to System z Operating System – z/OS Catalog Structure – Using Ditto to View VTOC 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 70

Introduction to System z Operating System – z/OS Catalog Structure – Using Ditto to View VTOC 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 71

Introduction to System z Operating System – z/OS Catalog Structure – Using Ditto to View VTOC 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 72

Introduction to System z Operating System – z/OS Catalog Structure – Using Ditto to View VTOC 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 73

Introduction to System z Operating System – z/OS Catalog Structure – Using ISPF Data Set List Utility 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 74

Introduction to System z Operating System – z/OS Catalog Structure – Using ISPF Data Set Utility 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 75

Introduction to System z Operating System – z/OS Data Facility / Storage Management Subsystem (SMS) 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 76

Introduction to System z Operating System – z/OS Data Facility / Storage Management Subsystem (SMS) 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 77

Introduction to System z Operating System – z/OS DFSMSdfp – Automatic Class Selection (ACS) Routine reads submitted JCL, modifies JCL based on coded criteria, then returns control to z/OS for allocation processing. ACS Routine chronological processing Data Class > Storage Class > Mgmt Class > Assign Storage Group (device media) 1) 2) 3) 4) 2/27/2021 Data Class Storage Class Management Class Storage Group assigned when coded criteria is matched ACS routine directs allocation to use specific device resources based on assigned 'Class' criteria. © Copyright IBM Corp. , 2008. All rights reserved. 78

Introduction to System z Operating System – z/OS DFSMSdfp – Automatic Class Selection (ACS) Routine What JCL DD operands influence the ACS routine? JCL DD statement coded • DATACLAS=, MGTMCLAS=, STORCLAS= • The values would be created by DASD administrator JCL DD statement DSN= and DISP= where a data set name standard is established, then ACS routine assigns JCL DD operands for new data set allocations based upon DSN=value 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 79

Introduction to System z Operating System – z/OS DFSMSdfp – Automatic Class Selection (ACS) Routine Data Class assigned values can include: Data set organization Record organization (RECORG), Record format (RECFM), Record length (LRECL) Key length (KEYLEN), Key offset (KEYOFF) Data set type PDS, PDSE, basic format, extended format, large format, or HFS (DSNTYPE) Space allocation AVGREC and SPACE Retention period or expiration date RETPD, EXPDT Data Class assigned values for VSAM data sets Volume-count IMBED or REPLICATE, CISIZE, FREESPACE, VOLUME SHAREOPTIONS, REUSE, INITIAL LOAD, Compaction SPANNED/NONSPANNED, BWO (backup while open), Media interchange type and LOGGING OPTIONS) Space constraint relief Block size limit 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 80

Introduction to System z Operating System – z/OS DFSMSdfp – Automatic Class Selection (ACS) Routine After the data set is allocated, the attributes in the Management Class control: Migration of the data set, including migration from primary storage to DFSMShsm-owned storage to archival storage Backup of the data set, including frequency of backup, number of versions, and retention criteria for backup versions Automatic deletion of data sets Automatic release of unused space in data sets The Hierarchical Storage Manager (DFSMShsm) or a functionally equivalent program performs these functions. 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 81

Introduction to System z Operating System – z/OS DFSMSdfp – Automatic Class Selection (ACS) Routine Storage Class The storage class contains the attributes that identify a storage service level to be used by SMS for storage of the data set. It replaces the storage attributes that are specified on the UNIT and VOLUME parameters for non-SMS-managed data sets. Example Storage Class ACS Routine code syntax: WHEN (&STORCLAS = ‘value') SET &STORGRP = ‘value' 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 82

Introduction to System z Operating System – z/OS Data Facility – Using ISMF 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 83

Introduction to System z Operating System – z/OS Data Facility – Using ISMF 2/27/2021 © Copyright IBM Corp. , 2008. All rights reserved. 84

Introduction to System z Operating System – z/OS Key Manuals for z/OS Data Sets, Catalogs & VTOCs DFSMS Bookshelf Ø Ø Ø 2/27/2021 DFSMS Introduction DFSMS: Using Data Sets DFSMS Implementing System Managed Storage DFSMSdfp Utilities DFSMSdfp Advanced Services DFSMS Managing Catalogs © Copyright IBM Corp. , 2008. All rights reserved. 85