Chapter 1. Data Set Overview

Table of Contents

1.1. Overview
1.2. Access Methods
1.3. Data Set Names
1.4. Managing Storage
1.4.1. Storage Class
1.4.2. Management Class
1.4.3. Data Class
1.5. Registering Catalogs
1.6. Processing Data Sets
1.6.1. Allocate/Unallocate
1.6.2. Open/Close
1.6.3. OPEN Mode
1.6.4. Access Mode
1.6.5. Record Access

This chapter provides a general overview of the data set including descriptions of the access methods, names, SMS classes, catalog registrations, management, and data set processing.

A data set is a file of logically linked data records. A record is the basic unit of information used in application programs. The fundamental difference between a data set and a UNIX file is that a data set provides access methods for record-level I/O.

Data sets are stored on secondary storage devices, such as hard disks or magnetic tapes, and its basic unit is a volume. While a hard disk can store all types of data sets, a magnetic tape can only store sequential data sets (SDS).

OpenFrame does not support real magnetic tape devices, but provides a set region of the hard disk mapped as a magnetic tape volume. Depending on the options, data sets stored on magnetic tape volumes can be kept in a compressed form.

The access method provides the functionality to read and store data in units of records. The access method stores data according to each data set structure and provides interfaces and utilities that process the data sets. Access methods allow record-level reading and storage of data. Each access method has its own dataset structure to store data and provides interfaces and utilities to process data sets. A particular access method used to process individual data set can be identified with its dataset structure. For example, the access methods used to process sequential data sets are BSAM or QSAM.

Note

OpenFrame does not support the physical I/O operations executed through mainframe's Execute Channel Program (EXCP) because general rehosted application programs rarely use the macros or functions of the mainframe's low level access methods. OpenFrame is not merely intended to support compatibility of macros or functions of mainframes, but rather to provide a cost efficient solution to significant changes of logical/external functionalities or concept, which incurs high costs.

The following are different types of data sets and their access methods:

Note

  1. OpenFrame provides TSAM as a VSAM counterpart. For more information about TSAM, refer to "Chapter 3. VSAM Data Sets".

  2. LDS is treated as flat data set (FDS) in Hitachi mainframes.

  3. For more information on VSAM data set types, refer to "3.3. VSAM Data Set Types".

When choosing an access method for a new data set, the first thing to consider is whether sequential processing or direct processing is required. For example, RRDS is ideally suited for application programs performing only direct processing or sequential processing. BSAM (sequential data sets) or VSAM ESDS data sets are suited for application programs performing sequential processing.

A new data set must be created with a unique name (in JCL, the data set name is used as the DSNAME).

The data set name is composed of a single name or a link of multiple name segments, with each name segment representing a qualifier level. For example, a data set with the name TPLAB.IGKANG.TEST3 is composed of three name segments. The first name segment, TPLAB, is called the high level qualifier, and the last name segment, TEST3, is called the low level qualifier.

Data sets are created with the following naming rules:

  • Each name segment can have up to eight characters.

  • A name segment must start with either a letter of the alphabet (A-Z) or a special character (@, #, $).

  • The rest of the segment can be composed of letters of the alphabet (A-Z), numbers (0-9), special characters (@, #, $), or a hyphen (-).

  • A period (.) in between name segments must be inserted as a separator.

  • The entire data set name is limited to 44 characters including the periods used to separate the name segments.

If you had to create a data set by specifying a unit or volume serial used to store the data set in JCL every time you need a data set, it would be inefficient. Also, if you were responsible for managing storage while running a job, you would be required to acquire systematic knowledge about storage management, which would be time-demanding.

OpenFrame provides SMS classes as solution to these problems. This section describes how to use SMS classes (storage, management, data) for efficient storage management in the OpenFrame system.

The OpenFrame system uses volume table of contents (VTOC) and catalogs to manage the physical storage locations of the data sets. VTOC manages data set lists, data set information, physical disk address, and data set sizes in a single volume. A catalog contains data set attributes and information on the data set's volume.

Data sets are registered in the catalog using the following:

  • JCL DISP parameter

  • Access method service ALLOCATE or DEFINE command

  • TSO ALLOCATE command

Already existing data sets can be registered in the catalog using the IDCAMS DEFINE RECATALOG command.

Note

  1. For more information about catalogs, refer to "Chapter 4. Integrated Catalog".

  2. IDCAMS is equivalent to JSCVSUT of Hitachi VOS3 VSAM and KQCAMS of XSP and MSP VSAM. For information about IDCAMS (JSCVSUT/KQCAMS) utility, refer to OpenFrame Utility Reference Guide.

Application programs process data sets in the following order in OpenFrame.

  1. Allocates a data set and logically links it to the program.

    The data in the allocated data set can be accessed using the interface provided by each access method.

    Data set allocation involves the following two tasks:

    • Allocate disk space for the new data set.

      A data set can be allocated using the following methods:

      MethodDescription

      Access Method Services (AMS)

      Uses IDCAMS (JSCVSUT/KQCAMS) ALLOCATE command.

      Job Control Language (JCL)

      Defines data sets in JCL.

    • Logically link the JOB STEP with the data set.

  2. Use the data set's DDNAME to open the data set.

  3. Use access method to read or write data to/from the data set.

  4. Close the data set.

  5. Unallocate the data set.

Note

Non-VSAM data sets are also processed in the same steps.

When you attempt to access an existing data set, the system uses the specified data set information in JCL and the catalog to find the data set address on a physical storage device.

When you try to create a new data set, the system uses the specified data set information to secure storage space for the data set on disk. The process of finding the storage device address for an existing data set or securing storage space for a new data set is called allocation.

  • Allocation for a new data set requires information about the volume and device where the data set is to be created and the data set size.

  • Allocation for an existing data set requires the volume and device information. If the data set is already in the catalog, only the data set name is required.

When allocating a data set to process it, the system prepares a structure called the data control block (DCB). The DCB is composed of buffers used to contain all the information required for data set processing and real-time I/O reporting.

Like the data set must be allocated before processing, it must be unallocated after processing the data set. The data set disposition method described in the JCL specifies how the system is to process the data set when unallocating it. For example, the disposition method for a temporary data set decides whether to retain the data set until the task is finished or to delete it right away. The disposition method for a permanent data set decides whether to register it to the master catalog or to the user catalog.

After a data set is opened, records within the data set can be processed using various interfaces provided by the access method. The READ interface, for example, can be used to read a record from the data set and the WRITE interface to add records to the data set.

The following are the four record access interfaces: