Completion of challenge #10 means you will have knowledge about z/OS that many z/OS technicians eventually understand after decades of using z/OS. However, a few highly experienced technicians must understand these details thoroughly. The z/OS technicians that understand these details in challenge #10 are typically the best z/OS technicians in a large enterprise.
The previous challenge described how a data set name is stored and located on a specific disk volume.
Large enterprise z/OS environments have many thousands of disk volumes.
How does z/OS locate a data set name among many thousands of disk
Challenge #10 will answer the above question with an explanation, then challenge your understanding of the explanation.
The simple answer is a CATALOG which is a list of entries
consisting of Data Set Name / Volume Label pairs.
When a data set name is allocated on a disk volume, z/OS updates a "catalog" inserting an entry with the data set name / volume label pair.
Request to access an existing data set name starts with search of the "catalog"
Refer back the diagram periodically to understand the description that follows.
The diagram consists of:
- 1 Master Catalog (MCAT)
- 3 User Catalogs (UCAT)s - 1, 2, and N
- 6 High Level Qualifiers (HLQ or ALIAS) - hlq1, hlq2, hlq3, hlq4, hlq5, hlq6
- 12 Data Set Names - example name is hlq1.dsn1
- 4 Disk Volumes - vol1, vol2, vol3, vol4
z/OS can manage many thousands of disk volume labels and millions of
data set names.
Are all these cataloged data set name / volume label pairs in one place?
"No". While possible to put all the pairs in one catalog data set,this is a bad idea for many reasons.
Where are these data set name / volume label pairs stored?
z/OS has a Master Catalog (MCAT) which is a VSAM data set type.
A z/OS system has one and only one MCAT
The MCAT could store millions of data set name / volume
But the "best practice" is to only store critical operating system data set name / volume label pairs in the MCAT
The business data set name / volume label pairs are stored in User Catalogs (UCAT)s
z/OS has many UCATs.
Each UCAT is defined by the storage administrator or systems programmer.
So, how does z/OS know which UCAT has the requested data
set name / volume label pair?
That question is the key to understanding the z/OS catalog structure.
All searches for data set names start with the MCAT.
MCAT has other entry types:
1. ALIAS name entry
2. User Catalog name entry
The ALIAS name is effectively the HLQ that represent a
collection of data set names.
Each ALIAS name entry is "related" to a UCAT name
Each UCAT name entry can have many ALIAS names "related" to it.
Therefore, the MCAT consists of many ALIAS / UCAT name pairs.
A contest system example would be Z99999.JCL
- HLQ is Z99999 - An ALIAS name of Z99999 was defined to the MCAT, "related" to a UCAT name
Note: Z99999 here refers to the actual userid Z99999, not to your personal userid.
The command below defined an ALIAS / UCAT pair entry in the MCAT
- define alias(name('z99999') relate('catalog.useraa'))
A future request for data set name 'Z99999.JCL' will:
1. Search the MCAT
2. Find Z99999 ALIAS name related to UCAT 'CATALOG.USERAA'
3. Forward the search to UCAT 'CATALOG.USERAA'
4. Find Z99999.JCL and associated volume label - data set name / volume label pair
5. Forward the search to the volume label where VTOC resides
A few commands to visualize the above explanation -
From ISPF command shell panel =6, enter the following:
- listc entry('z99999')
- listc entry('z99999') all
- listc all
- listc entry('catalog.useraa')
- listc entry('catalog.useraa') all
- tso help listc
- Above LISTC commands included contest system Master Catalog name
- The Master Catalog and User Catalogs are VSAM data set types
- The contest system has User Catalogs
Now you are ready for a challenge to demonstrate knowledge about z/OS catalog structure.
Successful completion is coding 2 LISTC commands as instructed.Review the LISTCAT command syntax.
- The LISTC command processed by a JCL job includes much more information than LISTC command executed from TSO/ISPF session. The difference between JCL job LISTC and interactive LISTC includes how to list User Catalogs.
- The interactive LISTC command was limited to data set names starting with your ID, a.k.a. HLQ, a.k.a. Catalog Alias Name.
- JCL processing of LISTC ALL will result in abend 722, system (JES2) line limit setting exceeded.
Bottom line - LISTC ALL in the JCL will NOT produce the requested the report and scorep2 routine will score challenge 10 as incorrect.
- tso submit jcl(job10)
- Review JOB10 SYSPRINT DDNAME output using SDSF (=sd) status panel (st). The output is over 25,000 lines where the interactive LISTC had less than 12 lines.
- Please purge the large output from test runs as you proceed - p in NP column to left of JOB10 while in SDSF status (st) panel.
The output is all entries in the Master Catalog - far beyond what is specifically requested for successful completion.
Edit e hlq.JCL(JOB10)
JOB10 includes 1 LISTC command with no operands.
Modify LISTC command adding operands that will:
1. List all the Master Catalog data set attributes such as VSAM type, MAXLRECL, VOLUME, etc.
Submit and review JOB10 output - sub ; =sd; st
Edit hlq.JCL(JOB10) and replicate (r) the LISTC command line creating a 2nd LISTC line.
Modify the 2nd LISTC command to include operands that will:
2. List **only the User Catalogs known by the Master Catalog.
Submit and review JOB10 output - sub ; =sd; st
The number of lines in the correct JOB10 SYSPRINT DDNAME output is less than 250 lines.
Observe Rec-Cnt column in the SDSF status panel for number of lines in output.
Once satisfied with output of JOB10 execution, then Edit hlq.JCL(JOB10) and change as follows:
1. Comment or delete JCL statement SYSPRINT DD that writes output to JES spool SYSOUT=*
2. Uncomment JCL statement SYSPRINT DD that writes output to &&TMP
3. Uncomment JCL statement EXEC TRUNC80
If the job run was successful, then P2.OUTPUT(#10) will contain requested information.
The #10 output is truncated to 80 columns and that is expected.
Now you know more than the average z/OS technician.
Feel free to move on to the next challenge now.