Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to find the total number of VSAM Files in a system ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Souparno

New User


Joined: 09 Sep 2008
Posts: 7
Location: India

PostPosted: Wed Sep 10, 2008 11:05 am    Post subject: How to find the total number of VSAM Files in a system ?
Reply with quote

Hi ,

Can you please help me figure out how to find the total number of VSAM files and preferably with their names present in a system. I would like to restrict to application VSAM files only (i.e. not underlying DB (DB2) VSAM files)

I understand all the entries should be there in the catalog entry files, but as an application developer I am not having access to browse the catalog file.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Sep 10, 2008 11:32 am    Post subject:
Reply with quote

Take a look at SYS1.SAMPLIB (IGGCSIRX) which should be easily changeable to give you what you need.
Back to top
View user's profile Send private message
Souparno

New User


Joined: 09 Sep 2008
Posts: 7
Location: India

PostPosted: Thu Sep 11, 2008 11:37 am    Post subject:
Reply with quote

expat wrote:
Take a look at SYS1.SAMPLIB (IGGCSIRX) which should be easily changeable to give you what you need.


Hi ,

I tried to execute the REXX with some changes, but didnt get the required information. Moreover, currently there is no VSAM file which I have created (seems like I can get the details VSAM files created by me only).

To elaborate my question: Requirement is to know the total number of application VSAM files present in the system.

I know the catalog files of the VSAM files, but cant browse. Somehow if I can mention the catalog file as input and and get the total number of VSAM files inside the catalog might help me solve my problem.

Thanks..
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Sep 11, 2008 12:18 pm    Post subject:
Reply with quote

It works fine for me icon_lol.gif

Why do you need this information ? I do ask because having spent 30+ years in the industry, and a lot of them responsible for storage management, this is never something I have ever wanted to know or have ever been asked to provide.

JCL
Code:

//STEP0020 EXEC PGM=IKJEFT01,PARM='REXX name'
//SYSEXEC  DD DSN=REXX library,DISP=SHR         
//SYSOUT   DD SYSOUT=*                     
//SYSTSPRT DD SYSOUT=*                     
//SYSTSIN  DD DUMMY                         
//CATIN    DD *                             
catalog name goes here
and the next one is here
etc etc
/*                                         


REXX
Code:

/* REXX ** VSAM FROM A GIVEN CATALOG NAME                            */
"EXECIO * DISKR CATIN ( STEM CAT. FINIS"                             
DO KCNT = 1 TO CAT.0                                                 
MODRSNRC = SUBSTR(' ',1,4)                                             
CSIFILTK = LEFT('**',44)                                               
CSICATNM = LEFT(CAT.KCNT,44)                                           
CSIRESNM = SUBSTR(' ',1,44)                                           
CSIDTYPS = 'CRG             '                                         
CSICLDI  = SUBSTR('Y',1,1)                                             
CSIRESUM = SUBSTR(' ',1,1)                                             
CSIS1CAT = SUBSTR(' ',1,1)                                             
CSIRESRV = SUBSTR(' ',1,1)                                             
CSINUMEN = '0001'X                                                     
CSIFLD1  = 'VOLSER  '                                                 
CSIOPTS  = CSICLDI || CSIRESUM || CSIS1CAT || CSIRESRV                 
CSIFIELD = CSIFILTK || CSICATNM || CSIRESNM || CSIDTYPS || CSIOPTS     
CSIFIELD = CSIFIELD || CSINUMEN || CSIFLD1                             
WORKLEN = 65536                                                       
DWORK = '00010000'X || COPIES('00'X,WORKLEN-4)                         
RESUME = 'Y'                                         
CATNAMET = SUBSTR(' ',1,44)                           
DNAMET = SUBSTR(' ',1,44)                             
DO WHILE RESUME = 'Y'                                 
 ADDRESS LINKPGM 'IGGCSI00  MODRSNRC  CSIFIELD  DWORK'
 RESUME = SUBSTR(CSIFIELD,150,1)                     
 USEDLEN = C2D(SUBSTR(DWORK,9,4))                     
 POS1=15                                             
 DO WHILE POS1 < USEDLEN                             
   IF SUBSTR(DWORK,POS1+1,1) = '0'                   
    THEN DO                                           
         CATNAME=SUBSTR(DWORK,POS1+2,44)             
         IF CATNAME ^= CATNAMET THEN                 
          DO                                         
           CATNAMET = CATNAME                         
          END                                         
         POS1 = POS1 + 50                             
         END                                         
   DNAME = SUBSTR(DWORK,POS1+2,44)                   
   IF SUBSTR(DWORK,POS1+1,1) = 'C' THEN DTYPE = 'CLUSTER '     
   ELSE IF SUBSTR(DWORK,POS1+1,1) = 'D' THEN DTYPE = 'DATA    '
   ELSE IF SUBSTR(DWORK,POS1+1,1) = 'I' THEN DTYPE = 'INDEX   '
   ELSE IF SUBSTR(DWORK,POS1+1,1) = 'A' THEN DTYPE = 'NONVSAM '
   ELSE IF SUBSTR(DWORK,POS1+1,1) = 'H' THEN DTYPE = 'GDS     '
   ELSE IF SUBSTR(DWORK,POS1+1,1) = 'B' THEN DTYPE = 'GDG     '
   ELSE IF SUBSTR(DWORK,POS1+1,1) = 'R' THEN DTYPE = 'PATH    '
   ELSE IF SUBSTR(DWORK,POS1+1,1) = 'G' THEN DTYPE = 'AIX     '
   ELSE IF SUBSTR(DWORK,POS1+1,1) = 'X' THEN DTYPE = 'ALIAS   '
   ELSE IF SUBSTR(DWORK,POS1+1,1) = 'U' THEN DTYPE = 'UCAT    '
   ELSE DTYPE = '        '                                     
    POS1 = POS1 + 46                                           
    NUMVOL = C2D(SUBSTR(DWORK,POS1+4,2))/6                     
    POS2 = POS1+6                                               
    VOLSER. = ""                                               
    DO I = 1 TO NUMVOL                                         
      VOLSER.I = SUBSTR(DWORK,POS2,6)                           
      POS2 = POS2 + 6                                           
    END                                                         
    IF DNAMET ^= DNAME THEN                         
    DO                                               
      IF LEFT(DNAME,9) <> 'SYS1.VVDS' THEN DO       
       SAY  SUBSTR(CATNAME,1,24) DTYPE DNAME VOLSER.1
      END                                           
     DNAMET=DNAME                                   
    END                                             
    POS1 = POS1 + C2D(SUBSTR(DWORK,POS1,2))         
  END                                               
END                                                 
END                                                 
Back to top
View user's profile Send private message
Souparno

New User


Joined: 09 Sep 2008
Posts: 7
Location: India

PostPosted: Thu Sep 11, 2008 1:41 pm    Post subject: Thanks a ton !
Reply with quote

Hi ,

Thanks a ton for your help !

Its working.... !! Yesterday, I did not modify the REXX properly. Now I am getting the expected results.

As to your question:
I work as an Application Developer / Analyst. In the recent past I have got into a system (new to me) and need to get the details and estimate of application VSAM files present in the existing system for development and migration assignments. Thanks.. icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us