How to report on contents of IDMS catalog load area

Document ID : KB000118439
Last Modified Date : 25/10/2018
Show Technical Document Details
Question:

How do we report on the contents of our CATSYS.DDLCATLOD? I want to see a list of the load modules in there to be sure that the only ones are my DMCL and my DBTABLE. 

Answer:
Currently there is no OCF/IDMSBCF command to DISPLAY ALL for DMCL LOAD MODULE or DBTABLE LOAD MODULE.

  A PRINT SPACE report for CATSYS.DDLCATLOD (FULL option) will show how many load modules reside in the area (number of SR156 records) but not the load module names.
  
   If you do not have the SQL option the long way to do this is described below.

   If you have the SQL option you can 

CONNECT TO SYSTEM;
SELECT * FROM SYSTEM.LOADHDR;

Example:

SELECT * FROM SYSTEM.LOADHDR;                                              
*+                                                                         
*+ NAME      VERSION    RLDS  EPA            LENGTH  DATE      TIME    TYPE
*+ ----      -------    ----  ---            ------  ----      ----    ----
*+ DMCLBOBT        1       0  00000000        23968  11/03/09  092748  00  
*+ DBTB1700        1       0  00000000         5152  02/13/13  143951  00  
*+ DMCL1850        1       0  00000000        48060  07/08/13  103930  00  
*+ LABDMCL         1       0  00000000         9236  08/24/10  083020  00  
*+ DBTB1850        1       0  00000000         5152  09/17/14  122411  00  
*+ RELD1700        1       0  00000000        49648  01/13/16  083741  00  
*+ DBTB1855        1       0  00000000          948  12/10/15  130754  00
 

The harder way:

  The subschema that describes the DDLCATLOD area that we deliver is IDMSCATL and this SS is used by utilities that will access DDLCATLOD.  
   But we do not deliver source for this SS so you would not be able to use it in OLQ to report on the LOADHDR-156 records in the area.

   You can create a special Schema and Subschema (PLEASE do not use the name of any SS load module we deliver) that defines the DDLCATLOD area and the records and sets that reside in the area (the same records and sets that reside in DDLDCLOD),  then this special SS can be used in OLQ to report on the LOADHDR-156 records (there is one  LOADHDR-156 for each generated Load Module) .

   The SYSDIRL dictionary has all of the record definitions referenced so that is where this special Schema/SS should be defined. 

Example.  I will use schema name CATLOAD.  Use any unique name you prefer.
Schema statements:
 ADD                                
 SCHEMA NAME IS CATLOAD VERSION IS 1 .

ADD                    
AREA NAME IS DDLCATLOD .

ADD                                               
RECORD NAME IS LOOAK-155                          
    SHARE STRUCTURE OF RECORD LOOAK-155 VERSION 1 
    RECORD ID IS 155                              
    LOCATION MODE IS CALC USING ( LOOAK-KEY-155 ) 
        DUPLICATES ARE NOT ALLOWED                
    WITHIN AREA DDLCATLOD
.

ADD                                                    
RECORD NAME IS LOADHDR-156                             
    SHARE STRUCTURE OF RECORD LOADHDR-156 VERSION 1    
    RECORD ID IS 156                                   
    LOCATION MODE IS CALC USING ( LOADHDR-MODNAME-156 )
        DUPLICATES ARE FIRST                           
    WITHIN AREA DDLCATLOD
.

ADD                                                  
RECORD NAME IS LOADTEXT-157                          
    SHARE STRUCTURE OF RECORD LOADTEXT-157 VERSION 1 
    RECORD ID IS 157                                 
    LOCATION MODE IS VIA LOADHDR-LOADTEXT SET        
    WITHIN AREA DDLCATLOD
.

ADD                                                 
RECORD NAME IS LOADCTL-158                          
    SHARE STRUCTURE OF RECORD LOADCTL-158 VERSION 1 
    RECORD ID IS 158                                
    LOCATION MODE IS VIA LOADHDR-LOADCTL SET        
    MINIMUM ROOT LENGTH IS 0 CHARACTERS             
    MINIMUM FRAGMENT LENGTH IS 4 CHARACTERS         
    WITHIN AREA DDLCATLOD
.

ADD                                              
RECORD NAME IS DPROG-171                         
    SHARE STRUCTURE OF RECORD DPROG-171 VERSION 1
    RECORD ID IS 171                               
    LOCATION MODE IS CALC USING ( DPROG-NAME-171 ) 
      DUPLICATES ARE FIRST                       
   WITHIN AREA DDLCATLOD
.

ADD                                                 
RECORD NAME IS LOADJCT-172                          
    SHARE STRUCTURE OF RECORD LOADJCT-172 VERSION 1 
    RECORD ID IS 172                                
    LOCATION MODE IS VIA LOADHDR-LOADJCT SET        
    WITHIN AREA DDLCATLOD
.

ADD                                                
RECORD NAME IS SYMHDR-174                          
    SHARE STRUCTURE OF RECORD SYMHDR-174 VERSION 1 
    RECORD ID IS 174                               
    LOCATION MODE IS VIA LOADHDR-SYMHDR SET        
    WITHIN AREA DDLCATLOD
.

ADD
RECORD NAME IS SYMTEXT-175                          
    SHARE STRUCTURE OF RECORD SYMTEXT-175 VERSION 1 
    RECORD ID IS 175                                
    LOCATION MODE IS VIA SYMHDR-SYMTEXT SET         
    WITHIN AREA DDLCATLOD
.

ADD                                                
RECORD NAME IS SYMCTL-176                          
    SHARE STRUCTURE OF RECORD SYMCTL-176 VERSION 1 
    RECORD ID IS 176                               
    LOCATION MODE IS VIA SYMHDR-SYMCTL SET         
    MINIMUM ROOT LENGTH IS 0 CHARACTERS            
    MINIMUM FRAGMENT LENGTH IS 4 CHARACTERS        
    WITHIN AREA DDLCATLOD
.

ADD                                
SET NAME IS DPROG-LOADJCT          
    ORDER IS NEXT                  
    MODE IS CHAIN LINKED TO PRIOR  
    OWNER IS DPROG-171             
        NEXT DBKEY POSITION IS 1   
        PRIOR DBKEY POSITION IS 2  
    MEMBER IS LOADJCT-172          
     NEXT DBKEY POSITION IS 1  
     PRIOR DBKEY POSITION IS 2 
     MANDATORY AUTOMATIC       
 .                             

ADD                               
SET NAME IS LOADHDR-LOADJCT       
    ORDER IS NEXT                 
    MODE IS CHAIN LINKED TO PRIOR 
    OWNER IS LOADHDR-156          
        NEXT DBKEY POSITION IS 5  
        PRIOR DBKEY POSITION IS 6 
    MEMBER IS LOADJCT-172         
        NEXT DBKEY POSITION IS 3  
        PRIOR DBKEY POSITION IS 4 
        LINKED TO OWNER           
        OWNER DBKEY POSITION IS 5 
        MANDATORY AUTOMATIC       
    .                                                                                                                                                                                   
ADD                              
SET NAME IS LOADHDR-LOADTEXT     
    ORDER IS NEXT                
    MODE IS CHAIN                
    OWNER IS LOADHDR-156         
        NEXT DBKEY POSITION IS 3 
    MEMBER IS LOADTEXT-157       
        NEXT DBKEY POSITION IS 1 
        MANDATORY AUTOMATIC      
    .  

ADD                              
SET NAME IS LOOAK-LOADHDR        
    ORDER IS NEXT                
    MODE IS CHAIN LINKED TO PRIOR
    OWNER IS LOOAK-155           
        NEXT DBKEY POSITION IS 1 
        PRIOR DBKEY POSITION IS 2
    MEMBER IS LOADHDR-156        
       NEXT DBKEY POSITION IS 1 
       PRIOR DBKEY POSITION IS 2
       OPTIONAL MANUAL          
  .        

ADD                              
SET NAME IS SYMHDR-SYMCTL        
    ORDER IS NEXT                
    MODE IS CHAIN                
    OWNER IS SYMHDR-174          
        NEXT DBKEY POSITION IS 3 
    MEMBER IS SYMCTL-176         
         NEXT DBKEY POSITION IS 1 
        MANDATORY AUTOMATIC      
    .      
                     
ADD                              
SET NAME IS SYMHDR-SYMTEXT       
    ORDER IS NEXT                
    MODE IS CHAIN                
    OWNER IS SYMHDR-174          
        NEXT DBKEY POSITION IS 2 
    MEMBER IS SYMTEXT-175        
        NEXT DBKEY POSITION IS 1 
        MANDATORY AUTOMATIC      
    .        
                   
ADD                              
SET NAME IS LOADHDR-LOADCTL      
    ORDER IS NEXT                
    MODE IS CHAIN                
    OWNER IS LOADHDR-156         
        NEXT DBKEY POSITION IS 4 
    MEMBER IS LOADCTL-158        
        NEXT DBKEY POSITION IS 1 
        MANDATORY AUTOMATIC      
    .      
                     
ADD                              
SET NAME IS LOADHDR-SYMHDR    
   ORDER IS NEXT                 
   MODE IS CHAIN                 
   OWNER IS LOADHDR-156          
        NEXT DBKEY POSITION IS 7  
   MEMBER IS SYMHDR-174          
       NEXT DBKEY POSITION IS 1  
       MANDATORY AUTOMATIC       
   .  


Now issue
VALIDATE.
This should get no errors.
Then in the subschema compiler:

ADD                                                              
SUBSCHEMA NAME IS CATLODSS OF SCHEMA NAME IS CATLOAD VERSION IS 1 
    .

ADD                          
AREA NAME IS DDLCATLOD       
    .                        
ADD                          
RECORD NAME IS LOOAK-155     
    .                        
ADD                          
RECORD NAME IS LOADHDR-156   
    .                        
ADD                          
RECORD NAME IS LOADTEXT-157  
    .                        
ADD                          
RECORD NAME IS LOADCTL-158   
    .                        
ADD                          
RECORD NAME IS DPROG-171     
    .                        
ADD                          
RECORD NAME IS LOADJCT-172   
    .                        
ADD                          
RECORD NAME IS SYMHDR-174    
    .                        
ADD                          
RECORD NAME IS SYMTEXT-175   
    .                        
ADD                          
RECORD NAME IS SYMCTL-176    
    .                        
ADD                          
SET NAME IS DPROG-LOADJCT    
    .                        
ADD                         
SET NAME IS LOADHDR-LOADJCT 
    .                       
ADD                         
SET NAME IS LOADHDR-LOADTEXT
    .                       
ADD                         
SET NAME IS LOOAK-LOADHDR   
    .                       
ADD                         
SET NAME IS SYMHDR-SYMCTL   
    .                       
ADD                         
SET NAME IS SYMHDR-SYMTEXT  
    .                       
ADD                         
SET NAME IS LOADHDR-LOADCTL 
    .                       
ADD                         
SET NAME IS LOADHDR-SYMHDR  
    .                       

GENERATE.  

This also should get no errors.
                          
Now you can use it in OLQ.
Set DICTNAME to SYSDIRL  (where your special Schema/SS are defined)
Set DBNAME to SYSTEM (to report on CATSYS.DDLCATLOD)
Select your special subschema and select record LOADHDR-156
You can select any record elements you wish.
For my test I just selected LOADHDR-MODNAME-156.  The DDLCATLOD I ran against has 7 load mods.

 LOADHDR-156 REPORT  
      10/24/18       
                     
 LOADHDR-MODNAME-156 
 ------------------- 
 DMCLBOBT            
 DBTB1700            
 DMCL1850            
 LABDMCL             
 DBTB1850            
 RELD1700            
 DBTB1855