Presentation is loading. Please wait.

Presentation is loading. Please wait.

Working with Datasets Part 1, non VSAM

Similar presentations


Presentation on theme: "Working with Datasets Part 1, non VSAM"— Presentation transcript:

1 Working with Datasets Part 1, non VSAM

2 Topic 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

3 Key Terms in This Topic block size catalog data set
high level qualifier (HLQ) library logical record length (LRECL) member partitioned data set (PDS) partitioned data set extended (PDSE) record format (RECFM) system-managed storage (SMS) virtual storage access method (VSAM) volume table of contents (VTOC)

4 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 (and TAPE). 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.

5 How data sets are named Data set naming convention 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: MYID.JCL.FILE2 HLQ: MYID 3 qualifiers Member name of partitioned data set 8 bytes long First byte: alphabetical (A-Z) or special # $) The 7 remaining: alphabetical, special, numeric (0-9) When you allocate a new data set (or when the operating system does), you must give the data set a unique name. A data set name can be one name segment, or a series of joined name segments. Each name segment represents a level of qualification. For example, the data set name VERA.LUZ.DATA is composed of three name segments. The first name on the left is called the high-level qualifier (HLQ), the last name on the right is the lowest-level qualifier (LLQ). Segments or qualifiers are limited to eight characters, the first of which must be alphabetic (A to Z) or special $). The remaining seven characters are either alphabetic, numeric (0 - 9), special, a hyphen (-). Name segments are separated by a period (.).

6 Data set Naming

7 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: HFS* * Includes zFS BDAM BSAM ISAM BPAM VSAM QSAM OAM DIV

8 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.

9 Datasets

10 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 data set panel, option 3.2 Access Method Services TSO ALLOCATE command job control language (JCL) To use a data set, you first allocate it (establish a link to it), then access the data using macros for the access method that you have chosen. The allocation of a data set means either or both of two things: To set aside (create) space for a new data set on a disk. To establish a logical link between a job step and any data set.

11 Allocating space on DASD volumes
How space is specified: explicitly (SPACE parameter) implicitly (SMS data class) Logical records and blocks: Smallest amount of data to be processed Grouped in physical records named blocks Data set extents: Space for a disk data set is assigned in extents You can specify the amount of space required in blocks, records, tracks, or cylinders. When creating a DASD data set, you specify the amount of space needed explicitly (by using the SPACE parameter), or implicitly (by using the information available in a data class). The system can use a data class if SMS is active even if the data set is not SMS managed. For system-managed data sets, the system selects the volumes, saving you from having to specify a volume when you allocate a data set. If you specify your space request by average record length, space allocation is independent of device type. Device independence is especially important to system-managed storage. A logical record (LRECL) is a unit of information about a unit of processing (for example, a customer, an account, a payroll employee, and so on). It is the smallest amount of data to be processed, and it is comprised of fields which contain information recognized by the processing application. Logical records, when located in DASD, tape, or optical devices, are grouped in physical records named blocks (BLKSIZE). Each block of data on a DASD volume has a distinct location and a unique address, thus making it possible to find any block without extensive searching. Logical records can be stored and retrieved either directly or sequentially. The maximum length of a logical record (LRECL) is limited by the physical size of the used media. Space for a disk data set is assigned in extents. An extent is a contiguous number of disk drive tracks (or cylinders). Data sets can increase in extents as they grow. Older types of data sets can have up to 16 extents per volume. Newer types of data sets can have up to 128 or 255 extents. In z/OS, a data set organization based on extents is designed to maximize disk performance. Reading or writing contiguous tracks is faster than reading or writing tracks scattered over the disk, as might be the case if tracks were allocated dynamically.

12 What is a data set, and how is it stored
A data set is a collection of logically related data; it can be a source program, a library of programs, or a file of data records used by a processing program. Data records are the basic unit of information used by a processing program. z/OS data sets are allocated in contiguous extents on a disk to enhance performance. Users must define the amount of space to be allocated for a data set (before it is used). A data set may occupy more than one extent and extents may be added dynamically. Almost all z/OS data processing is record-oriented. Byte stream files are not present in traditional processing, although they are a standard part of z/OS UNIX. z/OS records (and physical blocks) are in one of several well-defined formats. Most data sets have DCB attributes that include the record format (RECFM—F, FB, V, VB, U), the maximum logical record length (LRECL), and the maximum block size (BLKSIZE). When a member in a PDS is replaced, the new data area is written to a new section within the storage allocated to the PDS. When a member is deleted, its pointer is deleted too, so there is no mechanism to reuse its space. This wasted space is often called gas and must be periodically removed by reorganizing the PDS, for example, by using the utility IEBCOPY to compress it. iebcopy

13 Data set record formats
block BDW F FB V VB U Fixed records. Fixed blocked records. BLKSIZE = n * LRECL RDW Variable records. Variable blocked records. BLKSIZE >= 4 + n * largest LRECL Undefined records. No defined internal structure for access method. Record and block descriptors words are each 4 bytes long Traditional z/OS data sets are record oriented. In normal usage, there are no byte stream files such as are found in PC and UNIX systems. (z/OS UNIX has byte stream files, and byte stream functions exist in other specialized areas. These are not considered to be traditional data sets.) In z/OS, there are no new line (NL) or carriage return and line feed (CR+LF) characters to denote the end of a record. Records are either fixed length or variable length in a given data set. When editing a data set with ISPF, for example, each line is a record. Traditional z/OS data sets have one of five record formats, as shown on the slide. We must stress the difference between a block and a record. In this discussion, a block is what is written on disk, while a record is a logical entity. F - Fixed This means that one physical block on disk is one logical record and all the blocks/records are the same size. This format is seldom used. FB - Fixed Blocked This means that several logical records are combined into one physical block. This can provide efficient space utilization and operation. This format is commonly used for fixed-length records. V - Variable This format has one logical record as one physical block. The application is required to insert a four-byte Record Descriptor Word (RDW) at the beginning of the record. The RDW contains the length of the record plus the four bytes for the RDW. This format is seldom used. VB - Variable Blocked This format places several variable-length logical records (each with an RDW) in one physical block. The software must place an additional Block Descriptor Word (BDW) at the beginning of the block, containing the total length of the block. U - Undefined This format consists of variable-length physical records/blocks with no predefined structure. Although this format may appear attractive for many unusual applications, it is normally used only for executable modules.

14 Types of data sets We discuss three types in this class:
Sequential, partitioned, and VSAM A sequential data set is a collection of records written and read in sequential order from beginning to end. A partitioned data set (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. The simplest data structure in a z/OS system is a sequential data set. It consists of one or more records that are stored in physical order and processed in sequence. New records are appended to the end of the data set. An example of a sequential data sets might be an output data set for a line printer or a deck of punch cards. A z/OS user defines sequential data sets through job control language (JCL) with a data set organization of PS (DSORG=PS), which stands for physical sequential. In other words, the records in the data set are physically arranged one after another. A partitioned data set adds a layer of organization to the simple structure of sequential data sets. A PDS is a collection of sequential data sets, called members. Each member is like a sequential data set and has a simple name, which can be up to eight characters long. A PDS also contains a directory. The directory contains an entry for each member in the PDS with a reference (or pointer) to the member. Member names are listed alphabetically in the directory, but members themselves can appear in any order in the library. The directory allows the system to retrieve a particular member in the data set. A partitioned data set is commonly referred to as a library. A PDSE is a partitioned data set extended. It consists of a directory and zero or more members, just like a PDS. It can be created with JCL, TSO/E, and ISPF, just like a PDS, and can be processed with the same access methods. PDSE data sets are stored only on DASD, not tape.

15 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. Tape and optical media is also used In a z/OS system, data can be stored on a direct access storage device (DASD), magnetic tape volume, or optical media. The term DASD applies to disks or simulated equivalents of disks. All types of data sets can be stored on DASD, but only sequential data sets can be stored on magnetic tape. We discuss the types of data sets later in this module.

16 General Dataset Specifications
Tape media Tape Media 349

17 Types of Non-VSAM datasets
You create a directory when you create PDS dataset One dataset Multiple datasets Means of grouping similar Artifacts (code or data) Different business needs not necessarily related ani

18 Partitioned Datasets = PDSE

19 PDS versus PDSE PDS data sets: Simple and efficient way to organize related groups of sequential files. PDSE data sets: Similar to a PDS, but advantages include: Space reclaimed automatically when a member is deleted Flexible size Can be shared Faster directory searches A PDS data set offers a simple and efficient way to organize ‘related’ groups of sequential files. A PDS has the following advantages for z/OS users: Grouping of related data sets under a single name makes z/OS data management easier. Files stored as members of a PDS can be processed either individually or all the members can be processed as a unit. Because the space allocated for z/OS data sets always starts at a track boundary on disk, using a PDS is a way to store more than one small data set on a track. This saves you disk space if you have many data sets that are much smaller than a track. A track is 56,664 bytes for 3390 disk device. Members of a PDS can be used as sequential data sets, and they can be appended (or concatenated) to sequential data sets. Multiple PDS data sets can be concatenated to form large libraries. PDS data sets are easy to create with JCL or ISPF; they are easy to manipulate with ISPF utilities or TSO commands. However, some aspects of the PDS design affect both performance and the efficient use of disk storage, as follows: Wasted space. When a member in a PDS is replaced, the new data area is written to a new section within the storage allocated to the PDS. When a member is deleted, its pointer is deleted too, so there is no mechanism to reuse its space. Limited directory size. The size of a PDS directory is set at allocation time. As the data set grows, it can acquire more space in units of the amount you specified as its secondary space. These extra units are called secondary extents. However, you can only store a fixed number of member entries in the PDS directory because its size is fixed when the data set is allocated. If you need to store more entries than there is space for, you have to allocate a new PDS with more directory blocks and copy the members from the old data set into it. Lengthy directory searches. Entries are searched sequentially in alphabetical order. If the directory is very large and the members small, it might take longer to search the directory than to retrieve the member when its location is found. In many ways, a PDSE is similar to a PDS. Each member name can be eight bytes long. For accessing a PDS directory or member, most PDSE interfaces are indistinguishable from PDS interfaces. Both PDS and PDSE data sets are processed using the same access methods (BSAM, QSAM, BPAM). However, PDSE data sets have a different internal format, which gives them increased usability. You can use a PDSE in place of a PDS to store data, or to store programs in the ‘form’ of program objects. A program object is similar to a load module in a PDS. BUT - A load module cannot reside in a PDSE and be used as a load module. One PDSE cannot contain a mixture of program objects and data members. PDSE data sets have several features that can improve user productivity and system performance. The main advantage of using a PDSE over a PDS is that a PDSE automatically reuses space within the data set without the need for anyone to periodically run a utility to reorganize it. Also, the size of a PDS directory is fixed ‘regardless’ of the number of members in it, while the size of a PDSE directory is flexible and expands to fit the members stored in it. Further, the system reclaims space automatically whenever a member is deleted or replaced, and returns it to the pool of space available for allocation to other members of the same PDSE. The space can be reused without having to do an IEBCOPY compress utility. ` / X DISK Only

20 Advantages of PDSE The size of a PDSE directory is flexible and can expand to accommodate the number of members stored in it (the size of a PDS directory is fixed at allocation time). * PDSE members are indexed in the directory by member name. This eliminates the need for time-consuming sequential directory searches. * The logical requirements of the data stored in a PDSE are separated from the physical (storage) requirements of that data, which simplifies data set allocation. * PDSE automatically reuses space, without needing an IEBCOPY compress. A list of available space is kept in the directory. When a PDSE member is updated or replaced, it is written in the first available space. This is either at the end of the data set, or in a space in the middle of the data set marked for reuse. For example, by moving or deleting a PDSE member, you free space that is immediately available for the allocation of a new member. This makes PDSEs less susceptible to space-related abends than PDSs. * This space needs not be contiguous. The objective of the space reuse algorithm is not to extend the data set unnecessarily. * The number of PDSE members stored in the library can be large or small without concern for performance or space considerations. * You can open a PDSE member for output or update, without locking the entire data set. The sharing control is at member level, not the data set level. * The ability to update a member in place is possible with PDSs and PDSEs. But with PDSEs, you can extend the size of members and the integrity of the library is maintained while simultaneous changes are made to separate members within the library. * The maximum number of extents of a PDSE is 123; the PDS is limited to 16. * PDSEs are device-independent because they do not contain information that depends on location or device geometry. * PDSEs can contain program objects built by the program management binder that cannot be stored in PDSs.

21 Generation Dataset (GDG)
Generation Datasets: GDG Generation Dataset (GDG) DSN=MYFILE.ACCOUNT.FILE(+1) DSN=MYFILE.ACCOUNT.FILE(G00V0001) All of the datasets in the group can be referred to by a common name The Operating System is able to keep the generations in chronological order

22 IDCAMS Utility - LISTCAT output of GDG base
MHLRES4.TEST.GDG(+1) … MHLRES4.TEST.GDG(+2) during job run MHLRES4.TEST.GDG(0) …. MHLRES4.TEST.GDG(-1) at job conclusion

23 GDG illustration

24 Allocating a Dataset in ISPF
Attributes can also be entered thru JCL Note: Positional parameters //DDCARD DD DSN=ROGERS.JCL.TEST,DISP=(,CATLG), // SPACE=(CYL,(5,1,50),,CONTIG), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920) JCL NOTE: DFHSMS-ACS

25 Catalogs and VTOCs 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. VTOC: Lists the data sets on a volume Lists the free space on the volume. z/OS uses a catalog and a volume table of contents (VTOC) on each DASD to manage the storage and placement of data sets. z/OS requires a particular format for disks, which is shown on the next slide.

26 VTOC Format 7 DSCB Format 1 DSCB Cyl. 0 Trk. 0
Record 1 on the first track of the first cylinder provides the label for the disk. It contains the 6-character volume serial number (volser) and a pointer to the Volume Table Of Contents (VTOC), which can be located anywhere on the disk. The VTOC lists the data sets that reside on its volume, along with information about the location and size of each data set, and other data set attributes. A standard z/OS utility program, ICKDSF, is used to create the label and VTOC. When a disk volume is initialized with ICKDSF, the owner can specify the location and size of the VTOC. The size can be quite variable, ranging from a few tracks to perhaps 100 tracks, depending on the expected use of the volume. More data sets on the disk volume require more space in the VTOC. The VTOC also has entries for all the free space on the volume. Allocating space for a data set (described later) causes system routines to examine the free space records, update them, and create a new VTOC entry. Data sets are always an integral number of tracks (or cylinders) and start at the beginning of a track (or cylinder).

27 Dataset Control Blocks (DSCB)

28 IBM Utility – IEHLIST VTOC

29 VTOC Index Structure ISPF option 3.4

30 P D S E (123 Extents) VSAM (4GB limit)* Max Dataset Size
Some types of datasets are limited to 65,535 total tracks allocated on any one volume Exceptions: H F S (165.2 GB) P D S E (123 Extents) VSAM (4GB limit)* Special cases – Extended format data sets with multiple strips are limited to 16 volumes Tape datasets are limited to 255 volumes * Using Extendable Format = 128 TB

31 Volume Table of Contents
140 byte DSCBs First record in every VTOC  Format type 4

32 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. A catalog describes data set attributes and indicates the volumes on which a data set is located. Data sets can be cataloged, uncataloged, or recataloged. All system-managed DASD data sets are cataloged automatically in a catalog. Cataloging of data sets on magnetic tape is not required but usually it simplifies users jobs. All data sets can be cataloged in a catalog. In z/OS, the master catalog and user catalogs store the locations of data sets by name. This means that data set names must be unique. Both disk and tape data sets can be cataloged. To find a data set that you have requested, z/OS must know three pieces of information: Data set name Volume name Unit (the volume device type, such as a 3390 disk or 3590 tape) You can specify all three values on ISPF panels or in JCL. However, the unit device type and the volume are often not relevant to an end user or application program.

33 Catalog Structure VTOC
Basic Catalog Structure (BCS) – This is considered the “real” Catalog The BCS is a VSAM KSDS and its primary function is to point to the volumes on which the dataset is located. VSAM Volume Dataset (VVDS) – Can be considered an ‘extension’ of VTOC The VVDS is an ESDS containing information to process the dataset containing volume related information. VTOC

34 VSAM Volume Data Set

35 Integrated Catalog Structure (ICF)
Volume, Security, Ownership, etc. VSAM and non-SMS Managed Datasets SYS1.VVDS.Vvolser Many to Many Basic Catalog Structure (BCS) – Static information that rarely changes VSAM Volume DataSet (VVDS) - Additional Catalog Information

36 Where DS resides: Tape, Disk,…other
BCS – itself is a VSAM KSDS dataset Where DS resides: Tape, Disk,…other Uses Dataset Names as keys

37 VVDS example } ESDS: VSAM Seq file IN-CAT --- CATALOG.MASTER.MCAT
VSAM Utilities LINE COL COMMAND ===> SCROLL ===> PAGE ********************************* Top of Data ********************************** IDCAMS SYSTEM SERVICES TIME: 07:47:41 /* IDCAMS COMMAND */ LISTCAT ENTRIES(SYS1.VVDS.VDMPU03) CLUSTER SYS1.VVDS.VDMPU03 IN-CAT --- CATALOG.MASTER.MCAT DATA SYS1.VVDS.VDMPU03 THE NUMBER OF ENTRIES PROCESSED WAS: AIX ALIAS CLUSTER DATA GDG INDEX NONVSAM PAGESPACE PATH SPACE USERCATALOG TAPELIBRARY TAPEVOLUME TOTAL THE NUMBER OF PROTECTED ENTRIES SUPPRESSED WAS 0 IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0 } ESDS: VSAM Seq file

38 Catalog Path Structure
A z/OS system always has at least one master catalog. If a z/OS system has a single catalog, this catalog would be the master catalog and the location entries for all data sets would be stored in it. A single catalog, however, would be neither efficient nor flexible, so a typically z/OS system uses a master catalog and numerous user catalogs connected to it as shown on the slide. A user catalog stores the name and location of a data set (dsn/volume/unit). The master catalog usually stores only a data set HLQ with the name of the user catalog, which contains the location of all data sets prefixed by this HLQ. The HLQ is called an alias. On the slide, the data set name of the master catalog is SYSTEM.MASTER.CATALOG. This master catalog stores the full data set name and location of all data sets with a SYS1 prefix such as SYS1.A1. Two HLQ (alias) entries were defined to the master catalog, IBMUSER and USER. The statement that defined that IBMUSER included the data set name of the user catalog containing all the fully qualified IBMUSER data sets with their respective location. The same is true for USER HLQ (alias). When SYS1.A1 is requested, the master catalog returns the location information, volume(WRK001) and unit(3390), to the requestor. When IBMUSER.A1 is requested, the master catalog redirects the request to USERCAT.IBM, then USERCAT.IBM returns the location information to the requestor. DEFINE ALIAS (NAME (IBMUSER) RELATE (USERCAT.IBM ) )

39 Or located in SYS1.NUCLEUS(SYSCATxx)
Where MASTER CATALOG comes from SYS1.IPLPARM(LOADxx) example Is a file stored in the Service Element used by mainframe HW to define and manage channels, control units and device paths. Note: with the proper set up, a new Hardware addresses can be deployed with Dynamic Reconfiguration. Or located in SYS1.NUCLEUS(SYSCATxx) IEASYS xx For automatic commands located In COMMNDxx in PARMLIB Good documentation SYS1.SAMPLIB(IPXLOADX) On Master Console IEA101A SPECIFY SYSTEM PARAMETERS REPLY 00,’CMD=ZZ’ REPLY 00,’SYSP=CS,CMD=‘ZZ’ REPLY 00,’SYSP=00,CLPA,CMD=‘ZZ’ You can also do a LISTC on SYS1 to obtain its name example A example B example C

40 Good practice: different
User Catalog Alias’ Good practice: different applications in different UCATs

41 Locating a dataset in MVS
Oh…its Catalogued nevermind Where is that Dataset GREAT ! DS zOS 1.7 STEPCAT JOBCAT goes away

42 Catalog and Uncataloged Datasets
Note the ‘ // ‘ and parm statements used for Job Control Language

43 MVS Datasets and Unix Files

44 Traditional Disk Capacity (DASD)
Note ! New Disk Controllers The 3390/3380 Volume concept no longer exists We do not know where “logical” tracks are located on disks since several changes in device geometry have occurred with introduction of new products 3880 and 3990 Provides for Device Independence

45 Large Volume (own device type)

46 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. In a z/OS system, data management involves allocation, placement, monitoring, migration, backup, recall, recovery, and deletion. These activities can be done either manually or through the use of automated processes. When data management is automated, the operating system determines object placement, and automatically manages object backup, movement, space, and security. A typical z/OS production system includes both manual and automated processes for managing data sets. Data management includes these main tasks: Setting aside (allocating) space on DASD volumes Automatically retrieving cataloged data sets by name Mounting magnetic tape volumes in the drive Establishing a logical connection between the application program and the medium Controlling access to data Transferring data between the application program and the medium DFSMS performs the essential data, storage, program, and device management functions of the system. DFSMS is a set of products, and one of these products, DSFMSdfp, is required for running z/OS. DFSMS, together with hardware products and installation-specific settings for data and resource management, provides system-managed storage in a z/OS environment. The heart of DFSMS is the Storage Management Subsystem (SMS). Using SMS, the system programmer or storage administrator defines policies that automate the management of storage and hardware devices. These policies describe data allocation characteristics, performance and availability goals, backup and retention requirements, and storage requirements for the system. SMS governs these policies for the system and the Interactive Storage Management Facility (ISMF) provides the user interface for defining and maintaining the policies. The data sets allocated through SMS are called system-managed data sets or SMS-managed data sets.

47 Data Facility Subsystem Managed Storage (DFSMS)
Rules based

48 DFSMS (System Managed Storage)
Business Partner High Priority Customer care High Priority (Business Hours) Gold customer High Priority Casual customer Low priorty Data Analysis (Best can do) Policy Management

49 DFSMS uses “rule” based management
Automatic Class Selection Management Storage Data Business Partner High Priority Gold customer High Priority Customer care High Priority (Business Hours) Casual customer Low priorty Rule #3 Data Analysis (Best can do) Rule #1 Rule #2 Rule #4 Rule #5

50 Automatic Class Selection
Storage Used to control: performance goals availability Data Used to control: Allocation Space Management Used to control: retention migration backup release

51 Example of a Processing ACS Routines
Control Data Sets SCDS ACDS Policy Config. Active - SYSPLEX Wide - Note: ACS language is a high-level programming language. Once written you use the ACS translator to create an object form to be stored in the SMS configuration.

52 Rule Based Policy Management to Manage Backup/Restore Automatically via Hierarchical Storage
Business Partner High Priority Gold customer High Priority Data Analysis (Best can do) CritSit ! Rule #4 Rule #1 Rule #2 Secondary Storage Tape Third Storage Media Secondary Storage Secondary Storage

53 Interactive Storage Management Facility
is performed interactively via ISPF panels

54 Working with Datasets Part 2, VSAM

55 z/OS' Access Method 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) The term Virtual Storage Access Method (VSAM) applies to both a data set type and the access method used to manage various user data types. As an access method, VSAM provides much more complex functions than other disk access methods. VSAM keeps disk records in a unique format that is not understandable by other access methods. VSAM is primarily for applications. It is not used for source programs, JCL, or executable modules. VSAM files cannot be routinely displayed or edited with ISPF. You can use VSAM to organize records into four types of data sets: key-sequenced, entry-sequenced, linear, or relative record. The primary difference among these types of data sets is the way their records are stored and accessed.

56 VSAM Access Method

57 Simple VSAM control interval
Adjacent records of the same length only require 2 RDFs % of CI SIZE bytes Control Interval Definition Field i.e = CI CIDF (if free space % 0) RDF/Record* Record length 49 records / per CI But.. 10% freespace = 409 bytes used for inserts (4.9 records) VSAM works with a logical data area known as a Control Interval (CI) that is diagrammed in Figure 4-2. The default CI size is 4K bytes, but it can be up to 32K bytes. The CI contains data records, unused space, Record Descriptor Fields (RDF), and a CI Descriptor Field. A control interval may be constructed from smaller disk blocks, but this level of detail is internal to VSAM. Multiple control intervals are placed in a Control Area (CA). A VSAM data set consists of control areas and index records. One form if index record is the sequence set, which is the lowest-level indexes pointing to control intervals. Typical use of VSAM permits an application to insert new records in a data set.

58 Control Interval Format

59 VSAM KSDS CLUSTER

60 VSAM Index Structure

61 VSAM Keyed Dataset

62 VSAM Sequential Dataset = ESDS

63 VSAM - RRDS

64 VSAM LDS

65 via RSM algorithms DATA-IN-VIRTUAL (DIV) Address Space Data Space
Hiper Space via RSM algorithms

66 Basic Parms for VSAM KSDS Dataset

67 VSAM Datasets with SMS (ACS)
You can just provide the name Automatic Class Selection

68 VSAM Alternate Indexes
Component Index CI Data CI Base Cluster (Customer) unused 10 A-CITY TOM 12 B-CITY MIKE 15 A-CITY FRED Data Component 21 F-City BEN E-CITY FRED 36 B-CITY BILL 39 A-CITY FRED 41 G-CITY TOM F r e e MIKE TOM unused BEN 21 BILL 36 FRED MIKE 12 unused TOM 10 41 F r e e Alternate Index 1 Index CI Data CI E-CITY G-CITY unused Alternate Index 2 A-CITY B-CITY 12 36 E-CITY 23 unused F-CITY 21 G-CITY 41 F r e e Index CI Data CI

69 When to use which dataset type
Use KSDS if: – The data access is sequential, skip sequential, or direct access by a key field. – You would prefer easy programming for direct data processing. – There will be many record insertions, deletions, and logical record length varies. – You may optionally access records by an alternate index. – Complex recovery (due to index and data components) is not a problem. – You want to use data compression Use RRDS if: – The record processing is sequential, skip sequential, or direct processing. – Easy programming for direct processing is not a requirement. – The argument for accessing data in direct mode is a relative record number, not the contents of a data field (key). RRDS is suitable for the type of logical records identified by a continuous and dense pattern of numbers (such as 1,2,3,4...). – All records are fixed length. – There are a small number of record insertions and deletions, and all the space for insertions must be pre-allocated in advance. – Performance is an issue. RRDS performance is better than KSDS, but worse than QSAM or BSAM.

70 When to use which dataset type (cont.)
Use ESDS if: – You are adding logical records only at the end of the data set and reading them sequentially (in the application control). – The logical record is variable length – You seldom need direct record processing by key (using AIX). – You are using a batch processing application. Use LDS if: – You want to exploit DIV. – Your application manages logical records. – Performance is an issue.

71 See VSAM Demo KSDS INDEXED ESDS NONINDEXED LDS LINEAR RRDS NUMBERED
When defining a VSAM Cluster.... what are the key parameters that denotes the dataset type? KSDS INDEXED ESDS NONINDEXED LDS LINEAR RRDS NUMBERED Ans. See VSAM Demo

72 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. 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.


Download ppt "Working with Datasets Part 1, non VSAM"

Similar presentations


Ads by Google