VSAM is one of several access methods in z/OS
You have used several z/OS data storage methods
- MVS Sequential Data Sets (SEQ)
- MVS Partitioned Data Sets (PDS)
- Unix Filesystems (Files)
VSAM, Virtual Storage Access Method, is another z/OS data storage method. VSAM was developed after MVS SEQ and MVS PDS data storage methods. VSAM has superior I/O performance characteristics and the flexibility needed for innovative data storage advancements.
- Unix filesystems are stored in VSAM Linear Data Set formatted and managed by Unix
- Db2 relational database tables are stored in VSAM Linear Data Sets formatted and managed by Db2
VSAM is used to organize records into four types of data sets:
- Key-sequenced (KSDS)
This type 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. This provides random access to
data. Records are of variable length. IMS™ uses KSDSs.
- Entry-sequenced (ESDS)
This form of VSAM keeps records in sequential order. Records can be accessed sequentially.
It is used by IMS, DB2®, and z/OS® UNIX®.
- Linear (LDS)
This type is, 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). DB2 and a number of
z/OS system functions use this format heavily, but it is rarely used by application programs.
- Relative Record (RRDS)
This VSAM format allows retrieval of records by number; record 1, record 2, and so forth.
This provides random access and assumes the application program has a way to derive the
desisred record numbers.
The primary difference between the four types of VSAM data sets is the way that their records are stored and accessed.
Optional - not neccessary to complete the challenge
If you want to understand details of how VSAM records are stored and accessed,
then review IBM Redbook VSAM Demystified
Define a VSAM ESDS and copy member of MVS Partitioned Data Set to new VSAM ESDS
- From ISPF command line, enter dslist jcl
- Edit your jcl partitioned data set
- Enter s idcams to select a new empty jcl member
- Enter ISPF primary command, copy 'zos.public.jcl(idcams)'
- Delete and define a VSAM data
- Copy a PDS member to newly defined VSAM data set
where REPRO means to reproduce
- List attributes of VSAM data set writing output to p2.output(#11)
- Enter sub ; =sd ; st
System prompts for a jobname character to complete the build of the JCL JOB statement. Enter a jobname character of your choice
- Review JCL job output DDNAME SYPRINT associated with StepName COPY
The needed correction is to replace @@ with the appropriate OUTFILE value.
Review of the REPRO INFILE value associated with the JCL DDNAME as a pattern to find appropriate JCL DDNAME to be used for OUTFILE value.
- Edit JCL PDS member IDCAMS correcting the syntax error
- Enter sub ; =sd ; st
- Review JCL job output for success
How to verify challenge was successfully completed
Your technical exposure now includes the technical acronym, VSAM. Your z/OS experience is growing.