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.
Take a look at SYS1.SAMPLIB (IGGCSIRX) which should be easily changeable to give you what you need.
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.
Joined: 14 Mar 2007 Posts: 8593 Location: Back in jolly old England
It works fine for me
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.
//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
/* 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))
DO WHILE POS1 < USEDLEN
IF SUBSTR(DWORK,POS1+1,1) = '0'
IF CATNAME ^= CATNAMET THEN
CATNAMET = CATNAME
POS1 = POS1 + 50
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
IF DNAMET ^= DNAME THEN
IF LEFT(DNAME,9) <> 'SYS1.VVDS' THEN DO
SAY SUBSTR(CATNAME,1,24) DTYPE DNAME VOLSER.1
POS1 = POS1 + C2D(SUBSTR(DWORK,POS1,2))
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..