Archive for category Storage
Generation Data Group (GDG)
Posted by Rui Miguel Feio in MVS, Storage, Tech - Mainframe on September 18, 2010
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.
Virtual Storage Access Method (VSAM)
Posted by Rui Miguel Feio in Glossary, MVS, Storage, Tech - Mainframe on September 9, 2010
VSAM applies to both a data set type and the access method used to manage various user data types.
VSAM data sets are held on direct access storage devices (DASD) auxiliary storage. VSAM divides its data set storage into control areas (CA), which are further divided into control intervals (CI). Control intervals are the unit of data transmission between virtual and auxiliary storage. Each one is of fixed size and, in general, contains a number of records. A KSDS or ESDS can have records that extend over more than one control interval. These are called spanned records.
VSAM is primarily used for applications.
VSAM types:
KSDS:
- Key-Sequenced Data Set
- This is the most common use for VSAM
- Each record has one or more key fields and a record can be retrieved (or inserted) by key value.
- To find the physical location of a record in a KSDS, VSAM creates and maintains an index. This relates the key of each record to the record’s relative location in the data set. When you add or delete records, this index is updated accordingly.
- It provides random access of data.
- Starting with releases of DFSMS/MVS 1.4 and later, a data set can be greater than 4GB in size if it is defined as extended format and extended addressability in the storage class
- The KSDS cluster has two components in it:
- Index component
- Data component
ESDS:
- Entry-Sequenced Data Set
- Keeps records in sequential order
- Each record is identified by its Relative Byte Address (RBA)
- Records are held in the order in which they were first loaded into the data set.
- New records added to an ESDS always go after the last record in the data set.
- You cannot delete records or alter their lengths. After a record has been stored in an ESDS, its RBA remains constant.
- When browsing, records are retrieved in the order in which they were added to the data set.
- A standard ESDS (32 bit RBA) cannot contain more than 4 gigabytes (GB) of data. However, there is a different kind of ESDS that supports 64-bit Extended Relative Byte Addresses (XRBAs) and which is therefore not subject to the 4GB limit
RRDS:
- Relative Record Data Set
- RRDS records are identified by their Relative Record Number (RRN). The first record in the data set is RRN 1, the second is RRN 2, and so on.
- Provides random access and assumes the application program has a way to derive the desired record numbers.
- Records in an RRDS can be fixed or variable length records, and the way in which VSAM handles the data depends on whether the data set is a fixed or variable RRDS.
- A fixed RRDS has fixed-length slots predefined to VSAM, into which records are stored. The length of a record on a fixed RRDS is always equal to the size of the slot. VSAM locates records in a fixed RRDS by multiplying the slot size by the RRN (which you supply on the file control request), to calculate the byte offset from the start of the data set.
- A variable RRDS, on the other hand, can accept records of any length up to the maximum for the data set. In a variable RRDS VSAM locates the records by means of an index.
- A fixed RRDS generally offers better performance. A variable RRDS offers greater function.
- With releases of DFSMS/MVS 1.5 and later, a data set can be greater than 4 GB in size if it is defined as extended format and extended addressability in the storage class.
LDS:
- Linear Data Set
- It’s in effect a byte-stream data set and is the only form of a byte-stream data set in traditional z/OS files (as opposed to z/OS Unix files).
- A number of z/OS system functions use this format heavily, but is rarely used by application programs.
- It is a VSAM data set with a control interval size multiple of 4096 bytes.
- In a sense, a LDS is a non-VSAM file with some of the VSAM facilities, such as the use of IDCAMS and VSAM specific information in the catalog.
- The most common LDS exploiter is DB2
- Like the ESDS and RRDS, an LDS contains a data component only.
Display all the Storage Groups
Posted by Rui Miguel Feio in Storage, Tech - Mainframe on September 3, 2010
To display all the Storage Groups of the currently active SMS configuration, we use the command:
D SMS,SG(ALL)
Example:
D SMS,SG(ALL)
IGD002I 15:24:57 DISPLAY SMS 749
STORGRP TYPE SYSTEM= 1
SGTSTVL POOL +
SGDB2VL POOL +
DUMMY DUMMY .
SGOVRFL POOL *
SGTAPE TAPE +
***************************** LEGEND *****************************
. THE STORAGE GROUP OR VOLUME IS NOT DEFINED TO THE SYSTEM
+ THE STORAGE GROUP OR VOLUME IS ENABLED
- THE STORAGE GROUP OR VOLUME IS DISABLED
* THE STORAGE GROUP OR VOLUME IS QUIESCED
D THE STORAGE GROUP OR VOLUME IS DISABLED FOR NEW ALLOCATIONS ONLY
Q THE STORAGE GROUP OR VOLUME IS QUIESCED FOR NEW ALLOCATIONS ONLY
> THE VOLSER IN UCB IS DIFFERENT FROM THE VOLSER IN CONFIGURATION
SYSTEM 1 = SYST
Display the status of a storage group
Posted by Rui Miguel Feio in Storage, Tech - Mainframe on September 2, 2010
If you come across the need to check the status of a storage group then you can use the MVS command:
D SMS,SG(storage_group)
For example:
storage group name: STGTSTVL
RESPONSE=SYST
IGD002I 15:17:43 DISPLAY SMS 939
STORGRP TYPE SYSTEM= 1
SGTSTVL POOL +
***************************** LEGEND *****************************
. THE STORAGE GROUP OR VOLUME IS NOT DEFINED TO THE SYSTEM
+ THE STORAGE GROUP OR VOLUME IS ENABLED
- THE STORAGE GROUP OR VOLUME IS DISABLED
* THE STORAGE GROUP OR VOLUME IS QUIESCED
D THE STORAGE GROUP OR VOLUME IS DISABLED FOR NEW ALLOCATIONS ONLY
Q THE STORAGE GROUP OR VOLUME IS QUIESCED FOR NEW ALLOCATIONS ONLY
> THE VOLSER IN UCB IS DIFFERENT FROM THE VOLSER IN CONFIGURATION
SYSTEM 1 = SYST
If you would like to list the volumes that are part of the Storage Group, you would then issue the command:
D SMS,SG(SGTSTVL),LISTVOL
IGD002I 15:20:50 DISPLAY SMS 737
STORGRP TYPE SYSTEM= 1
SGTSTVL POOL +
VOLUME UNIT SYSTEM= 1 STORGRP NAME
TST001 5B22 + SGTSTVL
TST002 5B23 + SGTSTVL
TST003 5B24 + SGTSTVL
***************************** LEGEND *****************************
. THE STORAGE GROUP OR VOLUME IS NOT DEFINED TO THE SYSTEM
+ THE STORAGE GROUP OR VOLUME IS ENABLED
- THE STORAGE GROUP OR VOLUME IS DISABLED
* THE STORAGE GROUP OR VOLUME IS QUIESCED
D THE STORAGE GROUP OR VOLUME IS DISABLED FOR NEW ALLOCATIONS ONLY
Q THE STORAGE GROUP OR VOLUME IS QUIESCED FOR NEW ALLOCATIONS ONLY
> THE VOLSER IN UCB IS DIFFERENT FROM THE VOLSER IN CONFIGURATION
SYSTEM 1 = SYST
Display system connectivity of the tape and optical libraries
Posted by Rui Miguel Feio in Storage, Tech - Mainframe on September 2, 2010
If you wish to display which libraries are connected to your system you can use the MVS command:
D SMS,LIB(ALL)
Example:
D SMS,LIB(ALL)
RESPONSE=SYST
IGD002I 15:10:50 DISPLAY SMS 869
LIBRARY CLASS SYSTEM= 1
TSTATL1 TAPE +
***************************** LEGEND *****************************
. THE LIBRARY IS NOT DEFINED TO THE SYSTEM
+ THE LIBRARY IS ONLINE
- THE LIBRARY IS OFFLINE
P THE LIBRARY IS PENDING OFFLINE
SYSTEM 1 = SYST
We can see in this example that we have a tape library online on system SYST called TSTATL1. If we wish to obtain more details regarding this library we issue the command:
D SMS,LIB(TSTATL1),DETAIL
CBR1110I OAM library status: 563
TAPE LIB DEVICE TOT ONL AVL TOTAL EMPTY SCRTCH ON OP
LIBRARY TYP TYPE DRV DRV DRV SLOTS SLOTS VOLS
TSTATL1 AL 3584-L22 16 4 4 1060 187 148 Y Y
----------------------------------------------------------------------
MEDIA SCRATCH SCRATCH SCRATCH
TYPE COUNT THRESHOLD CATEGORY
MEDIA5 148 50 0005
----------------------------------------------------------------------
LIBRARY ID: A0669
OPERATIONAL STATE: AUTOMATED
ERROR CATEGORY SCRATCH COUNT: 9
----------------------------------------------------------------------
Convenience I/O station installed.
Convenience I/O station in Input mode.
Convenience I/O station Empty.
Bulk input/output not configured.
How to check if a volume is SMS-managed
Posted by Rui Miguel Feio in Storage, Tech - Mainframe on September 2, 2010
One of the ways (and probably the easiest) to check if a volume is SMS-managed is by using the MVS command:
D SMS,VOL(volser)
Here’s an example:
volume: TST001
Command:
D SMS,VOL(TST001)
The result would be:
RESPONSE=SYST
IGD002I 09:52:24 DISPLAY SMS 382
VOLUME UNIT SYSTEM= 1 STORGRP NAME
TST001 5B22 + SGTSTVL
***************************** LEGEND *****************************
. THE STORAGE GROUP OR VOLUME IS NOT DEFINED TO THE SYSTEM
+ THE STORAGE GROUP OR VOLUME IS ENABLED
- THE STORAGE GROUP OR VOLUME IS DISABLED
* THE STORAGE GROUP OR VOLUME IS QUIESCED
D THE STORAGE GROUP OR VOLUME IS DISABLED FOR NEW ALLOCATIONS ONLY
Q THE STORAGE GROUP OR VOLUME IS QUIESCED FOR NEW ALLOCATIONS ONLY
> THE VOLSER IN UCB IS DIFFERENT FROM THE VOLSER IN CONFIGURATION
SYSTEM 1 = SYST
As we can see from the display, volume TST001 has the unit address 5B22 and is part of the Storage Group SGTSTVL, meaning it’s SMS managed.
Follow Me!