6888260 overview of vsam
TRANSCRIPT
![Page 1: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/1.jpg)
Overview of VSAM
and Defining a Cluster
Department of Computer Science
Northern Illinois University
August 2005
![Page 2: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/2.jpg)
2
Introduction to VSAM
• Virtual Storage Access Method
– Three types of data set organizations
• KSDS: key-sequenced data set
• ESDS: entry-sequenced data set
• RRDS: relative record data set
![Page 3: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/3.jpg)
3
KSDS
• A record is identified for access by specifying its key value
• A key is an imbedded field that is used to uniquely identify a particular record
• A newer version of ISAM (from my generation!)
![Page 4: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/4.jpg)
4
ESDS
• A record is identified for access by specifying the physical byte location of the record’s first byte relative to the beginning of the data set
![Page 5: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/5.jpg)
5
RRDS
• A record is identified for access by specifying its record number relative to the first record in the data set
• features in common with BDAM (basic direct access method) (another from my generation!)
![Page 6: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/6.jpg)
6
VSAM Structure
• Cluster - a VSAM data set
• KSDS cluster
– index component
– data component
• ESDS and RRDS cluster
– data component only
![Page 7: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/7.jpg)
7
Creating a VSAM Data Set
• Use Access Method Services (AMS)
• IDCAMS
– Requires JCL statements
• SYSPRINT - to produce a listing
• SYSIN - contains AMS commands
![Page 8: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/8.jpg)
8
IDCAMS
//jobname JOB,REGION=256K
// EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//ddname DD parameters
//SYSIN DD *
![Page 9: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/9.jpg)
9
IDCAMS
• On job card, IDCAMS requires a minimum of 256k
• ddname: other data set(s) that might be needed
• Control statements
– must begin in cols 2-16
– can use a hyphen(-) for a continuation char
![Page 10: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/10.jpg)
10
IDCAMS
• Documentation can go anywhere except columns 1 or 2
• /* documentation is enclosed like C*/
![Page 11: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/11.jpg)
11
IDCAMS: Defining a Cluster
• AMS DEFINE command is used to create VSAM objects
– clusters
– alternate indexes
– user catalogs
![Page 12: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/12.jpg)
12
IDCAMS: Defining a Cluster
DEFINE CLUSTER (subparam [subparm] …. [subparm] )
[ DATA (subparm [subparm] …. [subparm] ) ]
[ INDEX (subparm [subparm] …. [subparm] ) ]
[ CATALOG (subparm [subparm] …. [subparm] ) ]
![Page 13: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/13.jpg)
13
IDCAMS: Defining a Cluster
• CLUSTER sub-parameters
– assign attributes to the cluster as a whole
• DATA and INDEX sub-parameters
– assign attributes to the data component of
ONLY KSDS clusters
• CATALOG sub-parameters
– specify the name and optional password of
the catalog where the catalog entries of the
cluster are placed
![Page 14: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/14.jpg)
14
IDCAMS: Defining a Cluster
//SYSIN DD *
DEFINE CLUSTER ( - /* DEFINE A CLUSTER */
NAME(KSDSCLUS) - /* CLUSTER NAME IS KSDSCLUS */
INDEXED - /* TYPE OF CLUSTER IS KSDS */
VOLUMES(ACA301) - /* VOLUME IDENTIFICATION */
TRACKS(1 1) ) - /* SPACE ALLOCATION */
DATA ( - /* DATA COMPONENT */
NAME(KSDSDATA) - /* NAME OF DATA COMP */
![Page 15: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/15.jpg)
15
IDCAMS: Defining a Cluster
KEYS(9 0) - /* KEY LEN = 9 OFFSET = 0 */
RECORDSIZE(90 90) - /* FIXED LEN RECORD = 90 */
FREESPACE(10 5) ) - /* 10% FREE IN CI, 5% IN CA */
INDEX ( - /* INDEX COMPONENT */
NAME(KSDSNDX) ) /* NAME OF INDEX COMP */
/*
![Page 16: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/16.jpg)
16
IDCAMS: Defining a Cluster
• Smaller version of DEFINE//SYSIN DD *
DEFINE CLUSTER ( - /* DEFINE A CLUSTER */
NAME(KSDSCLUS) - /* CLUSTER NAME IS KSDSCLUS */
INDEXED - /* TYPE OF CLUSTER IS KSDS */
VOLUMES(ACA301) - /* VOLUME IDENTIFICATION */
TRACKS(1 1) ) - /* SPACE ALLOCATION */
KEYS(9 0) - /* KEY LEN = 9 OFFSET = 0 */
RECORDSIZE(90 90) ) /* FIXED LEN RECORD = 90 */
/*
![Page 17: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/17.jpg)
17
Defining a KSDS
• DEFINE CLUSTER subparmeters
– NAME(cluster name)
• used to assign a unique name to the cluster
• standard 1 - 44 character
• start with your znumber
– INDEXED
• specifies a KSDS
![Page 18: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/18.jpg)
18
Defining a KSDS
• DEFINE CLUSTER subparmeters
– VOLUMES (volser)
• volume and serial number of the new cluster
• use ACA301
– TRACKS (primary secondary)
• primary - primary allocation (use 1)
• secondary - secondary allocation (use 1)
– will be done up to 122 times
![Page 19: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/19.jpg)
19
Defining a KSDS
• DEFINE CLUSTER subparmeters
– RECORDSIZE (average maximum)
• average - average number of bytes in the
record
• maximum - same as average for fixed length
records otherwise the maximum number of bytes of the record
![Page 20: 6888260 Overview of VSAM](https://reader036.vdocuments.mx/reader036/viewer/2022082223/5535fe6d4a795919278b4830/html5/thumbnails/20.jpg)
20
Defining a KSDS
• DEFINE CLUSTER subparmeters
– KEYS (length position)
• length - length of the key of the KSDA
• position - beginning position of key (starting
with 0)