Bulletin Board

What’s new at MAINFRAMES 360
(Updates June '10)...
- I am writing articles on CICS. The effort would be to make the material of certain standard, practical and easy to comprehend.
- JCL needs fresh look, and more weightage needs to assigned to conventions and practises adopted in Production Environments at most sites
- A note of appreciation : Thanks to all our followers, for making Mainframes360 a success!

Mainframes360 Search

Loading

Quick Links

Jump to :  

Tuesday, July 28, 2009

MVS System Catalog – Finding information about VSAM Cluster from the Catalog


Q. What’s a System Catalog? Why have one?
A Catalog is like an address book. A real-life address book stores the names of people, and their addresses(where they live/reside, where they work etc..). In a Mainframe System, there are many files(Datasets), that live in different areas of Memory(Storage). Each dataset is found in a different area/location. If you wanted to find a particular dataset, do anything with it, read it, update it etc., you would need to lookup where the dataset is. How do you know, in this vast expanse of storage space consisting several DASD Devices, each having many volumes, where your dataset lies. Its like finding a needle in a haystack.

Thanks to the MVS System Catalog. I call it the Address Book of the MVS O/S. You want to access a dataset, but don’t know where it is? Ask the System Catalog. The System Catalog tells you, where in the whole world of storage space, you dataset is..

Storage Devices like DASD are just like Hard-disk Drives. Inside, there are a no. of plates(platters)/circular disks. Each disk is called a volume. Every disk volume records information in tracks. These are just like the tracks on vinyl record/compact disk.

The Address Book of the MVS O/S – System Catalog stores the name of the dataset, along with the disk volume on which it resides.

Have you ever wondered, on Windows OS, why can't you have 2 files with the same name in a folder? In MVS O/S, on the same lines, you can't create two datasets with the same identical names. Its pretty easy to understand why. The MVS O/S keeps track of all the datasets. It stores information about the name of a dataset, and where this dataset is present on the disk(which volume). In other words, MVS O/S records the name and disk volume of the dataset.The list of all the datasets and their locations are stored in an area called MVS System Catalog. We say, that the dataset is cataloged. If MVS, does not have any information about the whereabouts of a dataset, that is it does not know, where to look for a dataset, we say that the dataset is un-cataloged.
Q. I would like to see what the MVS System Catalog looks like? How do see what’s in there?

When you would like to see(peek in) the entries of the MVS System Catalog, you must use the LISTCAT Command of the IDCAMS utility. In case of VSAM Files, the  MVS System Catalog also stores information about the Alternate Indexed, no. of records, control interval size, free space etc. So, you can find a lot meta-information(Information about data) for VSAM Files in the MVS System Catalog.

You can run LISTCAT from TSO. You must type TSO LISTCAT, and you can see the output.

The LISTCAT Command can be used to find the entries of the VSAM Cluster in the Catalog. So, if you want to see the entries of your VSAM file in the Catalog, you can use the LISTCAT AMS Control Statement. The LISTCAT Command has a few options :
1) ENTRIES - This is used to filter out the entry that you want to be listed.

For example, if you want to see all the catalog entries with the name CAA0176.DEMO.KSDS, you can code the ENTRIES option as

ENTRIES(CAA0176.DEMO.KSDS)

To code multiple files, you can simply put the continuation character :

ENTRIES(CAA0176.DEMO.KSDS1,          -
        CAA0176.DEMO.KSDS2,          -
        CAA0176.DEMO.KSDS3)

You can also make use of a generic name. Suppose, you wanted to list all entries in the catalog having the dataset names starting with CAA0176.DEMO.

ENTRIES(CAA0176.DEMO.*)

2) CLUSTER - This is used to specify that only the cluster entry is to be listed. If this is not mentioned, all the index entries would also be printed.
3) ALL - This means all field of the entry are to printed.

A Simple Batch JOB/JCL making use of the LISTCAT Command is shown here :

----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
//LISTCAT3 JOB A123,QUASAR,NOTIFY=&SYSUID                              
//STEP1  EXEC  PGM=IDCAMS                                              
//SYSPRINT DD  DSN=CAA0176.DEMO.JOBLOG,DISP=(OLD,KEEP,KEEP)            
//SYSIN    DD    *                                                     
  LISTCAT -                                                            
        ENTRIES(CAA0176.DEMO.KSDS) -                                   
        CLUSTER -                                                      
        ALL                                                            
/*                                                                     


Upon submitting the above Batch JOB/JCL. the JOB Log shows the following information -

DCAMS  SYSTEM SERVICES                                           TIME:
  LISTCAT -                                                            
        ENTRIES(CAA0176.DEMO.KSDS) -                                   
        CLUSTER -                                                      
        ALL                                                            
CLUSTER ------- CAA0176.DEMO.KSDS                                      
     IN-CAT --- CATALOG.T.ICFTST03                                     
     HISTORY                                                           
       DATASET-OWNER-----(NULL)     CREATION--------2009.208           
       RELEASE----------------2     EXPIRATION------0000.000           
     SMSDATA                                                           
       STORAGECLASS -------WORK     MANAGEMENTCLASS---SORTMC           
       DATACLASS --------(NULL)     LBACKUP ---0000.000.0000           
       BWO STATUS------00000000     BWO TIMESTAMP---00000 00:00:00.0   
       BWO---------------(NULL)                                        
     RLSDATA                                                           
       LOG ----------------(NULL)   RECOVERY REQUIRED --(NO)     FRLOG -
       VSAM QUIESCED -------(NO)    RLS IN USE ---------(NO)           
       LOGSTREAMID-----------------------------(NULL)                  
       RECOVERY TIMESTAMP LOCAL-----X'0000000000000000'                
       RECOVERY TIMESTAMP GMT-------X'0000000000000000'                
     PROTECTION-PSWD-----(NULL)     RACF----------------(NO)           
     ASSOCIATIONS                                                      
       DATA-----CAA0176.DEMO.KSDS.DATA                                 
       INDEX----CAA0176.DEMO.KSDS.INDEX                                
IDCAMS  SYSTEM SERVICES                                           TIME:
         THE NUMBER OF ENTRIES PROCESSED WAS:                          
                   AIX -------------------0                            
                   ALIAS -----------------0                            
                   CLUSTER ---------------1                            
                   DATA ------------------0                            
                   GDG -------------------0                            
                   INDEX -----------------0                            
                   NONVSAM ---------------0                            
                   PAGESPACE -------------0                            
                   PATH ------------------0                            
                   SPACE -----------------0                            
                   USERCATALOG -----------0                            
                   TAPELIBRARY -----------0                            
                   TAPEVOLUME ------------0                            
                   TOTAL -----------------1                            
         THE NUMBER OF PROTECTED ENTRIES SUPPRESSED WAS 0              
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0              
IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 0      


As you might notice, the above Catalog Entry gives all information like AIX, ALIAS, CLUSTER, DATA Cluster’s name, INDEX Cluster’s Name. Moreover, it also gives all the SMS-related(where on the disk this dataset resides) information.

0 comments:

Post a Comment

Related Posts with Thumbnails

Quick Links

Jump to :  

Note :

© Copyright – Quasar Chunawalla, 2010.
Note : The copyrights of all the material, text and pictures posted in this website belong to the author. Any instance of lifting the material from this website, shall be considered as an act of plagiarism. For any clarifications, please mail at quasar.chunawalla@gmail.com
 
back to top