VSAM
VSAM
VSAM
NAGARAJU DOMALA
VSAM
Course Coverage
VSAM Concepts
Internal Organization
Alternate Indexes
AMS Commands
VSAM Dataset allocation
AIX Allocation
Loading Datasets
Print,Copy and Alter Command
Processing KSDS w/o AIX
Processing KSDS with AIX
Processing ESDS, if time permits
2
Nagaraju Domala
Basic Concepts
What is VSAM ?
Virtual Storage Access Method (VSAM) is a high performance access method
used in IBM mainframe OS
VSAM resides in Virtual Storage along with the program that needs its
services for manipulation of data on DASD
VSAM arranges records by an index key or by relative byte addressing.
VSAM is used for direct or sequential processing of fixed and variable-
length records on DASD.
Data organized by VSAM is cataloged for easy retrieval, and is stored
in one of four types of data sets.
Nagaraju Domala
Basic Concepts
Nagaraju Domala
Advantages & Drawbacks Of VSAM
Advantages
The retrieval of records is faster because of an efficiently organized index.
The index is small because of key compression algorithm used to store and
retrieve records
Imbedded free space makes the insertion of records easy and therefore
requires less reorganization
The deletion of records means that they are physically deleted thus allowing
the reclaiming of free space within datasets
Records can be accessed randomly by key or address and can also be
accessed sequentially at the same time
VSAM datasets can be shared across partitions, regions, address space and
systems. The type and level of sharing can be controlled thru AMS and JCL
VSAM Ver 1.0 5
Nagaraju Domala
Advantages & Drawbacks Of VSAM
Advantages (contd)
VSAM provides data security thru passwords protection of datasets
at various levels like read and update
VSAM provides the ability to physically distribute datasets over
various volumes based on key ranges
VSAM datasets are device independent
Drawbacks
Free spaces, hence more disk space
Integrity
of VSAM datasets in cross systems and cross regions
sharing must be controlled by the User
VSAM Ver 1.0 6
Nagaraju Domala
Types of VSAM Datasets
Nagaraju Domala
Organising VSAM Datasets
Nagaraju Domala
Control Intervals
A control interval consists of:
Logical records
Free space
Control information fields.
Control Information Fields (CIDF & RDF)
Control information consists of two types of fields: one control
interval definition field (CIDF), and one or more record definition
fields (RDFs).
Nagaraju Domala
Control Area
CIDFs are 4 bytes long, and contain information about the control interval, including the amount and location
of free space.
RDFs are 3 bytes long, and describe the length of records and how many adjacent records are of the same
length. If two or more adjacent records have the same length, only two RDFs are used for this group. One
RDF gives the length of each record, and the other gives the number of consecutive records of the same
length.
Control Areas (CA)
The control intervals in a VSAM data set are grouped together into fixed-length contiguous areas of direct
access storage called control areas.
A VSAM data set is composed of one or more control areas (minimum 2 CIs)
The number of control intervals in a control area is fixed by VSAM.
The maximum size of a control area is one cylinder, and the minimum size is one track of DASD storage.
Min. size of CA is one track, Max. size is one cylinder
Free CIs may be left within CA
Nagaraju Domala
Control Area
Free Space
Free Space left within CI that is used when new records are added to CI
Free CI’s left within a CA that are used when new record additions
cannot fit into particular CI
Free CA’s left within a dataset that are utilized after all the free CI’s in a
particular CA have been used and none of the CI’s in that CA can
accommodate the record being inserted
For ESDS, free space is left only at the end of dataset
For ESDS, no imbedded free space between CI’s or CA’s
For RRDS, no free space is allocated
VSAM Ver 1.0 11
Nagaraju Domala
SPANNED Records
Spanned Records
Sometimes a record is larger than the control interval size used for a particular data set.
In VSAM, the SPANNED parameter allows a record to extend across or span control interval
boundaries.
Spanned records might reduce the amount of DASD space required for a data set when data
records vary significantly in length, or when the average record length is larger compared to the CI
size.
Nagaraju Domala
SPANNED Records
Remember
A spanned record always begins on a control interval boundary and fills more than one control
interval within a single control area.
For key-sequenced data sets, the entire key field of a spanned record must be in the first control
interval.
The control interval containing the last segment of a spanned record might also contain unused
space. You can use the unused space only to extend the spanned record; it cannot contain all or
part of any other record.
Spanned records can only be used with key-sequenced data sets and entry-sequenced data sets.
To span control intervals, you must specify the SPANNED parameter when you define your data
set. VSAM decides whether a record is SPANNED or NONSPANNED, depending on the control
interval length and the record length.
Locate mode (OPTCD=LOC on the RPL) is not a valid processing mode for spanned records. A
nonzero return code will be issued if locate mode is used.
Nagaraju Domala
VSAM Data Set Type
• Choosing a VSAM Data Set Type
VSAM supports these data set types: entry-sequenced (ESDS), key-
sequenced
(KSDS), linear (LDS), fixed-length and variable-length relative record
(RRDS).
Nagaraju Domala
VSAM Data Set Type
Applications best suited to entry-sequenced data sets
Applications that require sequential access only. It is better to use entry-sequenced data sets or variable-
length RRDSs for sequential access, because they support variable-length records and can be expanded
as records are added.
If you wish to use an entry-sequenced data set in an online application, load the data set sequentially by
a batch program and access the data set directly by the relative byte address (RBA).
Applications best suited to key-sequenced data sets
Applications that require that each record have a key field.
Applications that require both direct and sequential access.
Applications that use high-level languages which do not support RBA use.
Online applications usually use key-sequenced data sets.
You want to access the data by an alternate index.
The advantage of key-sequenced data sets over fixed-length RRDS using direct access is ease of
programming.
Nagaraju Domala
VSAM Data Set Type
Applications best suited to linear data sets
Linear data sets are rarely used by application programs. They are the most effective for
specialized applications. For example, Data-In-Virtual (DIV) stores data in linear data sets.
Applications best suited to relative record data sets
Applications that require direct access only.
Applications which there is a one-to-one correspondence between records and relative
record numbers. For example, you could assign numeric keys to records sequentially,
starting with the value 1. Then, you could access a RRDS both sequentially and directly
by key.
Fixed-length RRDSs use less storage and are usually faster at retrieving records than
key-sequenced data sets or variable-length RRDSs.
If the records vary in length, use a variable-length RRDS. Variable-length RRDSs can
be used for COBOL applications.
Nagaraju Domala
Entry Sequenced Dataset
Sequenced in the order in which they are entered in the dataset
No index component
New insertions are always added to the end of dataset
Update possible but no change of length
Can be accessed randomly or sequentially
No physical deletion
Alternate index possible
Records could be of variable length
Nagaraju Domala
Entry Sequenced Dataset
Nagaraju Domala
Key-Sequenced Dataset
Nagaraju Domala
Key-Sequenced Dataset
Record Keys & Pointers
Index Data
Component Component
Nagaraju Domala
Key-Sequenced Dataset
No Overflow component
Records can be of variable length
Key field cannot be modified
Can be accessed in a key sequence other than that of prime key field called alternate key
Alternate key possible and need not be unique
Nagaraju Domala
Key-Sequenced Dataset
Nagaraju Domala
Key-Sequenced Dataset
Free Space
When a key-sequenced data set is defined, unused space can be scattered throughout the data set to
allow records to be inserted or lengthened. This space is called free space.
When a new record is added to a control interval or an existing record is lengthened, subsequent
records are moved into the following free space to make room for the new or lengthened record.
When a record is deleted or shortened, the space given up is reclaimed as free space for later use.
When you define your data set, you can use the FREESPACE parameter to specify what percentage
of each control interval is to be set aside as free space when the data set is initially loaded.
Within each control area, you can reserve free space by using free control intervals to
avoid splitting your control area when you want to insert additional records or lengthen
existing records.
Whenyou define your data set, you can specify what percentage of the control area is to be
set aside as free space, using the FREESPACE parameter.
Nagaraju Domala
Key-Sequenced Dataset
Insertion of a Logical Record in a Control Interval
Nagaraju Domala
Key-Sequenced Dataset
Prime Index
A key-sequenced data set always has a prime index that relates key values to the
relative locations of the logical records in a data set. The prime index, or simply
index, has two uses:
To locate the collating position when inserting records
To locate records for retrieval
When initially loading a data set, records must be presented to VSAM in key
sequence. The index for a key-sequenced data set is built automatically by VSAM as
the data set is loaded with records.
When a data control interval is completely loaded with logical records, free space,
and control information, VSAM makes an entry in the index.
The entry consists of the highest possible key in the data control interval and a
pointer to the beginning of that control interval.
VSAM Ver 1.0 25
Nagaraju Domala
Relative Record Dataset
Nagaraju Domala
Relative Record Dataset
Nagaraju Domala
Relative Record Dataset
Nagaraju Domala
Relative Record dataset
Nagaraju Domala
Relative Record dataset
Nagaraju Domala
Comparison of Indexed Sequential & KSDS
Nagaraju Domala
Physical Sequential and ESDS
Nagaraju Domala
Rec 1 Rec 2 Rec 3 Rec 4
Control Interval
Control Interval
Control Interval
Control Interval
Control Interval
Control Interval
Control Interval
Control Interval
Nagaraju Domala
Access of VSAM Records
Nagaraju Domala
Access of VSAM Records
Entry-Sequenced Data Set
Nagaraju Domala
Access of VSAM Records
Key-Sequenced Data Set
The most effective way to access records of a key-sequenced data set is by key using
the associated prime index or by one of the alternate keys using Alternate index .
Keyed-Sequential Access
Sequential access is used to load a key-sequenced data set and to retrieve, update,
add, and delete records in an existing data set.
When you specify sequential as the mode of access, VSAM uses the index to access data
records in ascending or descending sequence by key.
Sequential processing can be started anywhere within the data set. Positioning is
necessary if your starting point is within the data set.
Positioning can be done by * Using the POINT macro or * Issuing a direct request,
then changing the RPL with the MODCB macro from "direct" to "sequential.”
Sequential access allows you to avoid searching the index more than once and is faster
than direct for accessing multiple data records in ascending key order.
VSAM Ver 1.0 36
Nagaraju Domala
Access of VSAM Records
Key-Sequenced Data Set
Keyed-Direct Access
Direct access is used to retrieve, update, delete and add records.
When direct processing is used, VSAM searches the index from the highest level
index-set record to the sequence-set for each record to be accessed.
Searches for single records with random keys is usually done faster with direct
processing.
You need to supply a key value for each record to be processed.
For retrieval processing, you can either supply the full key or a generic key. The
generic key is the high-order portion of the full key.
Direct access allows you to avoid retrieving the entire data set sequentially to
process a small percentage of the total number of records.
Nagaraju Domala
Access of VSAM Records
Key-Sequenced Data Set
Skip-Sequential Access
Skip-sequential access is used to retrieve, update, delete, and add records. When skip-
sequential is specified as the mode of access, VSAM retrieves selected records, but in ascending
sequence of key values.
Skip-sequential processing allows you to:
Avoid retrieving the entire data set sequentially to process a small percentage of the total
number of records
Avoid retrieving the desired records directly, this causes the prime index to be searched from
the top to the bottom level for each record
Addressed Access
Another way of accessing a key-sequenced data set is addressed access, using the RBA of a
logical record as a search argument.
Note that RBAs might change when a control interval split occurs or when records are added,
deleted, or changed in size.
VSAM Ver 1.0 38
Nagaraju Domala
Access of VSAM Records
Fixed-Length Relative Record Data Set
Nagaraju Domala
Access of VSAM Records
Variable-Length Relative Record Data Set
Nagaraju Domala
Access of VSAM Records
Variable-Length Relative Record Data Set
Nagaraju Domala
Alternate Index
Nagaraju Domala
Alternate Index
Alternate Index
The alternate index is a key-sequenced data set; it consists of an index component and a data
component. The records in the data component contain an alternate key and one or more
pointers to data in the base cluster. For an entry-sequenced base cluster, the pointers are RBA
values.
For a key-sequenced base cluster, the pointers are prime key values.
Each record in the data component of an alternate index is of variable length and contains header
information, the alternate key, and at least one pointer to a base data record. Header
information is fixed length and shows:
Whether the alternate index data record contains prime keys or RBA pointers
Whether the alternate index data record contains unique or nonunique keys
The length of each pointer
The length of the alternate key
The number of pointers.
Nagaraju Domala
Alternate Index
Nagaraju Domala
ALTERNATE INDEX
Nagaraju Domala
5 bytes Emp NO SSN
- 05 44444
- 10 11111
- 28 33333
- 52 55555
- 63 22222
Nagaraju Domala
5 bytes Emp Name SSN
- Butler 44444
- Krantz 33333
- Ranade 11111 55555
- Tanaka 22222
Nagaraju Domala
Alternate Index
Nagaraju Domala
Defining a VSAM Data Set
Nagaraju Domala
AMS COMMANDS
General Usage
DEFINE CLUSTER : Creates a catalog entry for VSAM object
DEFINE ALTERNATE INDEX (AIX) : define alternate index for base cluster
DEFINE PATH : Define a path to access VSAM dataset thru AIX key
DEFINE GDG : Define a generation data group
DELETE : Deletes one or more VSAM objects and their catalogs
LISTCAT : Lists information contained in VSAM catalog
PRINT : Print contents of VSAM or indexed-sequential data set (hexa or character formats)
REPRO : Copies a VSAM or sequential or indexed-sequential dataset into another VSAM or
sequential or indexed-sequential dataset or copies catalog to another catalog
VERIFY : Closes all open files, brings the index component up to date with data component
and verifies & corrects information in a catalog
Nagaraju Domala
AMS COMMANDS
Special Usage
ALTER : Change catalog information about an already cataloged
VSAM object
BLDINDEX : Initially load a newly defined alternate index
EXPORT : Unloads VSAM base cluster or AIX together with its
catalog entry into movable storage volume or alternatively copies
a user catalog and then disconnects that catalog from system’s
master catalog
IMPORT : Defines and loads a dataset or catalog that had been
unloaded via EXPORT.
VSAM Ver 1.0 51
Nagaraju Domala
AMS Commands
Define Cluster
Cluster Concept
For a key-sequenced data set, a cluster is the combination of the data component and the index
component. The cluster provides a way to treat the index and data components as a single
component with its own name.
Fixed-length RRDSs, entry-sequenced data sets, and linear data sets are considered to be
clusters without index components. To be consistent, they are given cluster names that are
normally used when processing the data set.
Defining a Data Set Using Access Method Services
VSAM data sets can be defined with either the DEFINE CLUSTER command or the ALLOCATE
command. When a cluster is defined, VSAM uses the following catalog entries to describe the
cluster:
A cluster entry describes the cluster as a single component.
A data entry describes the cluster's data component.
For a key-sequenced data set, an index entry describes the cluster's index component.
VSAM Ver 1.0 52
Nagaraju Domala
AMS Commands
Define Cluster
Naming a Cluster
Specify a name for the cluster, dsname in JCL, when defining it.
A cluster name that contains more than 8 characters must be segmented by periods; 1 to 8 characters
can be specified between periods. A name with a single segment is called an unqualified name.
A name with more than 1 segment is called a qualified name. Each segment of a qualified name is
called a qualifier.
You can, optionally, name the components of a cluster. If you do not explicitly specify a data or index
component name when defining a VSAM data set or alternate index, VSAM will generate a name.
VSAM uses the following format to generate names for both system-managed and non-system-managed
data sets:
EXAMPLE: Cluster name: SALES.REGION2.CLUSTER
Generated data name = SALES.REGION2.DATA
Generated index name = SALES.REGION2.INDEX
Nagaraju Domala
AMS Commands
Define Cluster
Nagaraju Domala
Some Commonly Used Parameters
Name
Cylinders, Tracks, Records : Space allocation for dataset
Suballocation | Unique
Suballocation indicates that the components of this VSAM dataset are to be suballocated
from an existing space on volume. A data space must exist if this parm is used
Unique indicates that the space is to be built and assigned to each component of cluster
Indexed/Numbered/Nonindexed/Linear - type of data organisation
Erase/Noerase
Erase , data component is physically deleted
No Erase , Only entry removed from the catalog
Freespace (CI Percent CA Percent)
Keys (length, offset)
VSAM Ver 1.0 55
Nagaraju Domala
Some Commonly Used Parameters
Spanned/Nonspanned
if the max. record length is more than the CI size specified, allocation will fail unless
Spanned is specified
Imbed
The sequence set of the index component of a KSDS is placed on the first track of the
data component and is replicated as many times as possible
It reduces the seek time it takes the read write head to move from the index to the data
component
Replicate
What Imbed does to sequence set, Replicate does for an index set.
It forces each CI of the index set of the index component to be written on a separate
track and replicated as many times as possible
The replication factor reduces the rotational delay
VSAM Ver 1.0 56
Nagaraju Domala
Some Commonly Used Parameters
SHAREOPTIONS
SHAREOPTION(cross region,cross sys)
Cross Region
Different regions within same CPU
Possible values : 1 2 3 4
Recommended value 1 or 2
Cross System
Different regions on multiple CPU’s
Possible Values 3 4
Recommended 3
Share Option 1
Either one user can update or many users can read the data. Ensures complete read and write
integrity
VSAM Ver 1.0 57
Nagaraju Domala
Some Commonly Used Parameters
Share Option 2
Allows multiple users to read a dataset at the same time one user
can update it. Provides write integrity but not read
Share Option 3
Multiple users can read and write at same time. NO read , write
integrity provided. User application responsible for integrity
Share Option 4
Same as 3, but buffer used for direct processing are refreshed
each time an i/o is performed on the dataset.
Nagaraju Domala
Defining A KSDS
//DEFKSDS EXEC=IDCAMS
//SYSIN DD *
DEFINE CLUSTER (NAME(EMPLOYEE.KSDS.CLUSTER) -
VOLUMES(VSAM02) -
CYLINDERS(2,1) -
CONTROLINTERVALSIZE(4096) -
FREESPACE(10,20) -
KEYS(9,0) -
RECORDSIZE(50,50) -
DATA (NAME(EMPLOYEE.KSDS.DATA) -
CISZ (4096) ) -
INDEX (NAME(EMPLOYEE.KSDS.INDEX) -
CONTROLINTERVALSIZE(1024)) -
CATALOG(VSAM.USERCAT.TWO)
VSAM Ver 1.0 59
Nagaraju Domala
Defining a ESDS
//DEFESDS EXEC=IDCAMS
//SYSIN DD *
DEFINE CLUSTER (NAME (EMPLOYEE.ESDS.CLUSTER) -
VOLUMES(VSAM02) -
CYLINDERS(2,1) -
CONTROLINTERVALSIZE(4096) -
RECORDSIZE(50,50) -
NONINDEXED -
DATA (NAME(EMPLOYEE.ESDS.DATA) )
CATALOG(VSAM.USERCAT.TWO)
VSAM Ver 1.0 60
Nagaraju Domala
Defining a RRDS
//DEFRRDS EXEC=IDCAMS
//SYSIN DD *
DEFINE CLUSTER (NAME (EMPLOYEE.RRDS.CLUSTER) -
VOLUMES(VSAM02) -
CYLINDERS(2,1) -
CONTROLINTERVALSIZE(4096) -
RECORDSIZE(50,50) -
NUMBERED -
DATA (NAME(EMPLOYEE.RRDS.DATA) )
CATALOG(VSAM.USERCAT.TWO)
VSAM Ver 1.0 61
Nagaraju Domala
REPRO
Nagaraju Domala
REPRO
Nagaraju Domala
Alternate Index Allocation
An alternate index is a key-sequenced data set containing index entries organized by the
alternate keys of its associated base data records. It provides another way of locating
records in the data component of a cluster. An alternate index can be defined over a key-
sequenced or entry-sequenced cluster.
Enables to look at base cluster as it it was sequenced on a field other than prime key field
It is different dataset physically. Always a KSDS with its own Index and data
component.Can be created on KSDS and ESDS but not on RRDS
Requires twice the number of I/O compared to Prime key field access
Up to 253 AIX
Prime key and AIX key may overlap but cannot start from same location
Unique and Non-unique AIX key
Must be defined on the same catalog as base cluster
Nagaraju Domala
Alternate Index Allocation
Nagaraju Domala
Alternate Index Allocation
Nagaraju Domala
AIX ON A KSDS
RECORDSIZE(16,16) FREESPACE(20,20) -
SHAREOPTION(2,3) -
DATA (NAME(EMPLOYEE.KSDS.AIX1.DATA) ) -
INDEX(EMPLOYEE.KSDA.AIX1.INDEX))
Record length of unique key alternate index = 5 + length of alt key + length of prime key
-
Nagaraju Domala
Nonunique AIX on a KSDS
UPGRADE -
RECORDSIZE(29,56) -
FREESPACE(20,20) -
SHAREOPTION(2,3) -
DATA (NAME(EMPLOYEE.KSDS.AIX2.DATA) ) -
INDEX(EMPLOYEE.KSDA.AIX2.INDEX))
Nagaraju Domala
AIX On An ESDS
Cobol Compiler does not support AIX on ESDS in batch environment. It can be used in
CICS. Assembler Support AIX on ESDS
//ESDSAIX1 EXEC PGM=IDCAMS
//SYSIN DD *
DEFINE AIX (NAME EMPLOYEE.ESDS.AIX1.CLUSTER) -
RELATE (EMPLOYEE.ESDS.CLUSTER) -
FREESPACE(20,20) SHAREOPTION(2,3) -
DATA (NAME(EMPLOYEE.ESDS.AIX1.DATA) ) -
INDEX(EMPLOYEE.ESDA.AIX1.INDEX))
Nagaraju Domala
BLDINDEX
Nagaraju Domala
BLDINDEX
or
//SYSIN DD *
BLDINDEX
INDATASET(EMPLOYEE.KSDS.CLUSTER)
OUTDATASET(EMPLOYEE.KSDS.AIX.CLUSTER)
//*
Nagaraju Domala
Define Path
Nagaraju Domala
Define Path
Nagaraju Domala
COBOL Coding for VSAM Files
ENVIRONMENT DIVISION Entries
Nagaraju Domala
COBOL Coding for VSAM Files
ENVIRONMENT DIVISION Entries
Nagaraju Domala
COBOL Coding for VSAM Files
Data DIVISION Entries
Fixed-Length Records
The compiler determines the records to be fixed length if
you use the RECORD CONTAINS integer clause.
Omit the RECORD CONTAINS integer clause but define all the level-01
record description entries associated with the file to be the same fixed size
Variable-Length Records
The compiler determines the records to be variable-length if
use the RECORD IS VARYING FROM integer-1 TO integer-2)
Omit the RECORD clause, but code multiple level-01 records that are of
different sizes, or contain an OCCURS DEPENDING ON clause.
VSAM Ver 1.0 76
Nagaraju Domala
COBOL Coding for VSAM Files
Input/Output Statements for VSAM Files
Nagaraju Domala
COBOL Coding for VSAM Files
Input/Output Statements for VSAM Files
Nagaraju Domala
COBOL Coding for VSAM Files
Input/Output Statements for VSAM Files
Nagaraju Domala
COBOL Coding for VSAM Files
Input/Output Statements for VSAM Files
Nagaraju Domala
COBOL Coding for VSAM Files
Input/Output Statements for VSAM Files
Nagaraju Domala
COBOL Coding for VSAM Files
Input/Output Statements for VSAM Files
Randomly : In any order, depending on how you set the RECORD
KEY or ALTERNATE RECORD KEY or the RELATIVE KEY before
your READ request.
Dynamically : Mixed sequential and random.
Updating Records in a VSAM File
Nagaraju Domala
COBOL Coding for VSAM Files
Input/Output Statements for VSAM Files
Updating Records in a VSAM File (contd)
Nagaraju Domala
COBOL Coding for VSAM Files
Input/Output Statements for VSAM Files
Nagaraju Domala
COBOL Coding for VSAM Files
Input/Output Statements for VSAM Files
Nagaraju Domala
COBOL Coding for VSAM Files
Input/Output Statements for VSAM Files
Nagaraju Domala
PROCESSING KSDS W/O AIX
SELECT
OPEN
READ
WRITE
START
READ NEXT
CURRENT RECORD POINTER (CRP)
CONCEPTUAL POINTER valid only for Sequential request
indicates the next record to be accessed by READ or READ NEXT
Established by OPEN ,READ, READ NEXT or START command
Unsuccessful OPEN, READ, READ NEXT, START - undefined CRP
Unaffected by DELETE command
VSAM Ver 1.0 87
Nagaraju Domala
Processing KSDS with AIXs
SELECT Statement
ALTERNATE KEY
WITH DUPLICATE
OPEN & CLOSE Statements
All the related AIXs are opened (closed) when BASE Cluster is acted upon
Building an AIX at Base Cluster Load Time
Status of both Base & AIX clusters after creation is Unloaded
After loading records into Base , thru pgm, the status of ONLY base is
changed to Loaded. AIXs are still unloaded
BLDINDEX must be used to build alternate index(s), Only then the
status is changed
VSAM Ver 1.0 88
Nagaraju Domala
Processing KSDS with AIXs
At the time loading of records in base cluster, Parm AIXBLD may be used to
change the status at the same time
//LOADSTEP EXEC PGM=A,
// PARM=‘/AIXBLD’
MUST provide SYSPRINT DD
Key of Reference
Isthe key in the base cluster which is currently beign used to retrieve
records
Could be prime or one of the alternate keys.
Only one key of reference at a time
Nagaraju Domala
Processing KSDS with AIXs
Nagaraju Domala
Generation Data Sets
A generation data set is one of a collection of successive, historically related, cataloged data sets,
known as a generation data group (GDG). Each data set within a generation data group is called a
generation data set (GDS) or generation.
Processing Generation Data Groups
Absolute Generation and Version Numbers
An absolute generation and version number is used to identify a specific generation of a
generation data group.
The generation and version numbers are in the form GxxxxVyy, where xxxx is an unsigned 4-
digit decimal generation number (0001 through 9999) and yy is an unsigned 2-digit decimal
version number (00 through 99)
Relative Generation Number
As an alternative to using absolute generation and version numbers when cataloging or
referring to a generation, we can use a relative generation number.
For example, A.B.C(-1). A.B.C(+1), or A.B.C(0).
VSAM Ver 1.0 91
Nagaraju Domala
Generation Data Sets
DEFINE GENERATIONDATAGROUP
DEFINE GENERATIONDATAGROUP Parameters
DEFINE GENERATIONDATAGROUP
(NAME(entryname)
LIMIT(limit)
[EMPTY|NOEMPTY]
[OWNER(ownerid)]
[SCRATCH|NOSCRATCH]
[TO(date)|FOR(days)])
[CATALOG(catname[/password])]
Nagaraju Domala
Generation Data Sets
Nagaraju Domala
Generation Data Sets
Nagaraju Domala