Archive for category Storage

VSAM Open Error Codes

136(88) Not enough Virtual-Storage Space is available for Work Areas, Control Blocks, or Buffers.
144(90) An uncorrectable I/O error occurred while VSAM was Reading or Writing a catalog record.
148(94) No record for the data set to be opened was found in the available catalog(s) or an unidentified error occurred while VSAM was searching the catalog.
152(98) Security Verification failed; the password specified in the Access-Method Control Block for a specified level of access does not match the password in the catalog for that level of access.
164(A4) An uncorrectable I/O error occurred while VSAM was Reading the Volume Label.
168(A8) The data set is not available for the type of processing you specify, or an attempt was made to open a Reusable data set with the Reset option while another user had the data set.
176(B0) An error occurred while VSAM was attempting to fix a page of Virtual storage in Real storage.
180(B4) A VSAM catalog specified in JCL either does not exist or is not open, and no record for the data set to be opened was found in any other catalog.
184(B8) An uncorrectable I/O error occurred while VSAM was completing an I/O request.
188(BC) The data set indicated by the Access-Method Control Block is not of the type that may be specified by an Access-Method Control Block.
192(C0) An unusable data set was opened for output.
232(E8) Reset was specified for a nonreusable data set and the data set is not empty.
236(EC) A permanent Staging error occurred in MSS (Acquire).
244(F4) The Volume containing the Catalog Recovery area was not mounted and verified for output processing.

No Comments

VSAM Logical Error Codes

004(04) Read past end of file
008(08) You attempted to store a record with a Duplicate Key, or there is a duplicate record for an alternate index with the unique key option.
012(0C) You attempted to store a record out of Ascending Key Sequence in Skip-Sequential Mode; record had a Duplicate Key; for Skip-Sequential processing your GET, PUT, and POINT Requests are not referencing records in Ascending Sequence; or, for Skip-Sequential Retrieval, the key requested is lower than the previous key requested. For Shared Resources, buffer pool is full.
016(10) Record not found.
020(14) Record already held in exclusive control by another requester.
024(18) Record resides on a volume that cannot be mounted.
028(1C) Data set cannot be extended because VSAM can’t allocate additional Direct-Access Storage Space. Either there is not enough space left to make the secondary allocation or you attempted to increase the size of a data set while processing SHROPT=4 and DISP=SHR.
036(24) KeyRangeswere specified for the data set when it was defined but no range was specified that includes the record to be inserted.
040(28) Insufficient Virtual Storage to complete the request. 044(2A) Work area too small. 064(40) All available strings are in use.
068(44) You attempted to use a type of processing (Output or Control-Interval Processing) that was not specified when the data set was opened.
074(4A) Trying to use keys on ESDS or RRDS.
076(4C) You issued an Addressed or Control-Interval PUT to add to a Key-Sequenced data set, or issued a Control-Interval put to a Relative Record data set.
080(50) Trying to delete from ESDS.
084(54) Using OPTCODE=LOC for a PUT.
088(58) You issued a Sequential GET request without having caused VSAM to be positioned for it, or you changed from Addressed Access to Keyed Access without causing VSAM to be positioned for Keyed- Sequential Retrieval; there was no Sequential PUT insert for a Relative Record data set, or you attempted an illegal switch between forward and backward processing.
92(5C) A PUT for update or an ERASE was issued without a previous GET for update, or a PUTIX was issued without a previous GETIX.
96(60) Changing the Prime Key or Key of Reference when making an update. 100(64 Trying to change record length.
104(68) The RPL options are either invalid or conflicting. 108(6C) RECLEN specified was larger than the maximum allowed, equal to 0, or smaller than the sum of the length and the displacement of the key field; RECLEN was not equal to record (SLOT) size specified for a Relative Record data set.
112(70) Invalid key length.
116(74) Trying to update an empty dataset.
120(78) Request was submitted by the wrong task. 132(84) An attempt was made in Locate Mode to retrieve a Spanned Record.
136(88) You attempted an Addressed GET of a Spanned record in a Key- Sequenced data set.
140(8C) Inconsistent Spanned record.
144(90) Invalid pointer (no associated base record) in an Alternate Index.
148(94) Maximum number of Alternate Index pointers exceeded.
152(98) Not enough buffers available.
156(9C) Invalid control interval.
192(C0) Invalid Relative Record number in a RRDS dataset.
196(C4) Addressed access to a Relative Record (RRDS) dataset is not allowed.
200(C8) Addressed Access or Generic Backward processing by Key thru a path is not allowed.
204(CC) Attempting a PUT in backward mode.
252(FC) Record mode processing is not allowed for a Linear data set.

No Comments

VTOC (Volume Table of Contents)

z/OS uses a Catalog and a Volume Table of Contents (VTOC) on each DASD to manage the storage and placement of data sets

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

You can also create a VTOC with an index. The VTOC index is actually a data set with the name SYS1.VTOCIX.volser, which has entries arranged alphabetically by data set name with pointers to the VTOC entries. It also has bitmaps of the free space on the volume.

A VTOC index allows the user to find the data set much faster.

No Comments

Swapping

Swapping is the process of transferring all of the pages of an address space between real storage and auxiliary storage. A swapped-in address space is active; having pages in real storage frames and pages in auxiliary storage slots. A swapped-out address space is inactive; the address space resides on auxiliary storage and cannot execute until it is swapped in.

While only a subset of the address space’s pages (known as its working set) would likely be in real storage at any time, swapping effectively moves the entire address space. It is one of several methods that z/OS uses to balance the system workload and ensure that an adequate supply of available real storage frames is maintained.

Swapping is performed by the System Resource Manager (SRM) component, in response to recommendations from the Workload Manager (WLM) component.

No Comments

The Paging Process

In addition to the DAT hardware and the segment and page tables required for address translation, paging activity involves a number of system components to handle the movement of pages and several additional tables to keep track of the most current version of each page.

To understand how paging works, assume that DAT encounters an invalid page table entry during address translation, indicating that a page is required that is not in a real storage frame. To resolve this page fault, the system must bring the page in from auxiliary storage. First, however, it must locate an available real storage frame. If none are available, the request must be saved and an assigned frame freed. To free a frame, the system copies its contents to auxiliary storage and marks its corresponding page table entry as invalid. This operation is called a page-out.

After a frame is located for the required page, the contents of the page are copied from auxiliary storage to real storage and the page table invalid bit is set off. This operation is called a page-in.

Paging can also take place when z/OS loads an entire program into virtual storage. z/OS obtains virtual storage for the user program, and allocates a real storage frame to each page. Each page is then active and subject to the normal paging activity; that is, the most active pages are retained in real storage while the pages not currently active might be paged out to auxiliary storage.

Page stealing

z/OS tries to keep an adequate supply of available real storage frames on hand. When a program refers to a page that is not in real storage, z/OS uses a real storage page frame from a supply of available frames.

When this supply becomes low, z/OS uses page stealing to replenish it, that is, it takes a frame assigned to an active user and makes it available for other work. The decision to steal a particular page is based on the activity history of each page currently residing in a real storage frame. Pages that have not been active for a relatively long time are good candidates for page stealing.

Unreferenced interval count

z/OS uses a sophisticated paging algorithm to efficiently manage virtual storage based on which pages were most recently used. An unreferenced interval count indicates how long it has been since a program referenced the page. At regular intervals, the system checks the reference bit for each page frame. If the reference bit is off — that is, the frame has not been referenced — the system adds to the frame’s unreferenced interval count. It adds the number of seconds since this address space last had the reference count checked. If the reference bit is on, the frame has been referenced and the system turns it off and sets the unreferenced interval count for the frame to zero. Those frames with the highest unreferenced interval counts are those most likely to be stolen.

z/OS also uses various storage managers to keep track of all pages, frames, and slots in the system.

No Comments

Frames, Pages and Slots

When a program is selected for execution, the system brings it into virtual storage, divides it into pages of 4 kilobytes (4K), and transfers the pages into real storage for execution. To the programmer, the entire program appears to occupy contiguous space in storage at all times. Actually, not all pages of a program are necessarily in real storage, and the pages that are in real storage do not necessarily occupy contiguous space.

The pieces of a program executing in virtual storage must be moved between real and auxiliary storage. To allow this, z/OS manages storage in units, or blocks, of 4 kilobytes.

The following blocks are defined:

- A block of real storage is a frame.

- A block of virtual storage is a page.

- A block of auxiliary storage is a slot.

A page, a frame, and a slot are all the same size: 4096 bytes (4 kilobytes). An active virtual storage page resides in a real storage frame. A virtual storage page that becomes inactive resides in an auxiliary storage slot (in a paging data set).

No Comments

Virtual Storage

Virtual Storage means that each running program can assume it has access to all of the storage defined by the architecture’s addressing scheme. The only limit is the number of bits in a storage address. This ability to use a large number of storage locations is important because a program may be long and complex, and both the program’s code and the data it requires must be in real storage for the processor to access them.

z/OS supports 64-bit long addresses, which allows a program to address up to 16 exabytes (18,446,744,073,709,600,000 bytes) of storage locations. In reality, the mainframe might have much less real storage installed. How much less depends on the model of CP and the system configuration.

To allow each user to act as though this much storage really exists in the computer system, z/OS keeps only the active portions of each program in real storage. The rest of the code and data is kept in files called Page Data Sets on Auxiliary Storage, which usually consists of a number of high-speed DASDs (Direct Access Storage Devices).

Virtual Storage is therefore a combination of Real and Auxiliary Storage. z/OS uses a system of tables and indexes to relate the Auxiliary Storage locations to Real Storage locations and keep track of the identity and authority of each program.

How does the operating system keep track of each program piece?

How does it know whether it is in real storage or auxiliary storage, and where?

It is important for z/OS professionals to understand how the operating system makes this happen.

Physical Storage is divided into areas, each the same size and accessible by a unique address. In Real Storage, these areas are called frames; in Auxiliary Storage, they are called slots.

Similarly, the operating system can divide a program into pieces the size of frames or slots and assign each piece a unique address. This arrangement allows the operating system to keep track of these pieces. In z/OS, the program pieces are called pages.

Pages are referenced by their virtual addresses and not by their real addresses. From the time a program enters the system until it completes, the virtual address of the page remains the same, regardless of whether the page is in Real Storage or Auxiliary Storage.

Each page consists of individual locations called bytes, each of which has a unique virtual address.

The use of Virtual Storage in z/OS means that only the pieces of a program that are currently active need to be in Real Storage at processing time. The inactive pieces are held in Auxiliary Storage.

No Comments

Physical Storage

Conceptually, mainframes and all other computers have two types of physical storage:

- The physical storage located on the mainframe processor itself. This is called processor storage or real storage; think of it as memory for the mainframe.

- The physical storage external to the mainframe, including storage on direct access devices, such as disk drives and tape drives. This storage is called auxiliary storage.

The primary difference between the two kinds of storage relates to the way in which it is accessed, as follows:

- Real storage is accessed synchronously with the processor. That is, the processor must wait while data is retrieved from real storage.

- Auxiliary storage is accessed asynchronously. The processor accesses auxiliary storage through an input/output (I/O) request, which is scheduled to run amid other work requests in the system. During an I/O request, the processor is free to execute other, unrelated work.

As with memory for a personal computer, mainframe real storage is tightly coupled with the processor itself, whereas mainframe auxiliary storage is located on (comparatively) slower, external disk and tape drives.

Because real storage is more closely integrated with the processor, it takes the processor much less time to access data from real storage than from auxiliary storage. However, the processor is free to do other work while waiting for an I/O request to be satisfied.

Auxiliary storage is less expensive than real storage, so it provides the capability for many jobs to be running while keeping real storage costs down.

No Comments

Dynamic Address Translation (DAT)

Dynamic Address Translation, or DAT, is the process of translating a virtual address during a storage reference into the corresponding real address. If the virtual address is already in real storage, the DAT process may be accelerated through the use of a translation lookaside buffer; if the virtual address is not in real storage, a page fault interrupt occurs, z/OS is notified, and z/OS brings the page in from auxiliary storage.

Looking at this process more closely reveals that the machine can present any one of a number of different types of faults. A type, region, segment, or page fault will be presented depending on at which point in the DAT structure invalid entries are found.

The faults will repeat, down the DAT structure until ultimately a page fault is presented and the virtual page is brought into real storage either for the first time (there is no copy on auxiliary storage) or by bringing the page in from auxiliary storage.

DAT is implemented by both hardware and software through the use of page tables, segment tables, region tables and translation lookaside buffers. DAT allows different address spaces to share the same program or other data that is for read only. This is because virtual addresses in different address spaces can be made to translate to the same frame of real storage. Otherwise, there would have to be many copies of the program or data, one for each address space.

No Comments

Generation Data Group (GDG)

GDG is a collection of historically related non-VSAM data sets that are arranged in chronological order. Each data set within a GDG is called a generation data set (GDS) or generation.

Within a GDG, the generations can have like or unlike DCB attributes and data set organizations. If the attributes and organizations of all generations in a group are identical, the generations can be retrieved together as a single data set.

Generation data sets can be sequential, PDSs, or direct (BDAM). Generation data sets cannot be PDSEs, UNIX files, or VSAM data sets. The same GDG may contain SMS and non-SMS data sets.

Advantages to grouping related data sets include:

  • All of the data sets in the group can be referred to by a common name.
  • The operating system is able to keep the generations in chronological order.
  • Outdated or obsolete generations can be automatically deleted by the operating system.

To define a GDG you must first create a GDG base. This base defines the base portion of the dataset names used by the GDGs as well as defining how many generations (files) can be stored within the GDG. Once this maximum number of generations is reached, creating a new generation will result in the oldest generation being discarded. A GDG can hold up to 255 generations.

The files within a GDG are assigned names derived from the name of the base and have a generation number added to the end so as to give each file a unique name.

For example:

GDG base name: TEST.DATASET

The first file created within this GDG will be given the name TEST.DATASET.G0001V00

Subsequent files will be named by incrementing the generation number:

G0002V00, G0003V00, etc. all the way up to G9999V00

Once the G9999V00 generation number is reached the numbering will start again from G0001V00.

Notes:

1.      The two zeroes on the end of the name are now usually used for version control.

2.      Only one version is kept for each generation.

Generation data sets have sequentially ordered absolute and relative names that represent their age. The operating system’s catalog management routines use the absolute generation name (ex: TEST.DATASET.G0002V00). The relative name is a signed integer used to refer to the latest (0), the previous (-1) and the next (+1), and so forth, generation.

Example:

Previous: TEST.DATASET(-1)

Current: TEST.DATASET(0)

Next: TEST.DATASET(+1)

Next +1: TEST.DATASET(+2)

Referencing the entire GDG

It is possible to reference the entire GDG as if it were a single file by using the base name instead of an absolute or relative file reference. All files within the GDG will then be processed starting from the oldest generation and ending with the latest one. Note that to be able to reference all of the generations at once in this way that all of the files need to be defined with the common Data Control Block information (ex: the same record length). If the files within a GDG are never to be referenced this way then there is no requirement that they have any file attributes in common.

Rolled in and rolled off

When a GDG contains its maximum number of active generation data sets in the catalog, defined in the LIMIT parameter, and a new GDS is rolled in at the end-of-job step, the oldest generation data set is rolled off from the catalog. If a GDG is defined using DEFINE GENERATIONDATAGROUP EMPTY and is at its limit, then when a new GDS is rolled in, all the currently active GDSs are rolled off.

1 Comment