Page 1 of 1
Need to check whether file is ESDS file or not by using REXX
Posted: Sat Oct 05, 2024 2:28 pm
by Devrana
Hello Team,
I have list of files and I would like to know which file is ESDS among those files using REXX. I thought of using LISTCAT but not sure how to use it in REXX. Please assist.
Re: Need to check whether file is ESDS file or not by using
Posted: Sat Oct 05, 2024 7:51 pm
by sergeyken
Code: Select all
x = OUTTRAP( 'LISTING.' ) /* reroute output to REXX stem */
"TSO LISTDS ...parameters...." /* execute TSO command */
y = OUTTRAP( 'OFF' ) /* stop rerouting */
/* analyze LISTDS output line-by-line */
Do I = 1 To LISTING.0
Say LISTING.I
End I
Re: Need to check whether file is ESDS file or not by using
Posted: Sat Oct 05, 2024 10:56 pm
by Devrana
Thanks for your response!
Can I check with 'Non indexed' on any of the listing paramater ? If yes then could you please assist me on that.
Re: Need to check whether file is ESDS file or not by using
Posted: Sun Oct 06, 2024 1:41 pm
by willy jensen
The word LINEAR springs to mind. Or perhaps better look for INDEXED not in the list. They will be in the ATTRIBUTES subsection of the DATA section.
Re: Need to check whether file is ESDS file or not by using
Posted: Mon Oct 07, 2024 11:29 pm
by sergeyken
Devrana wrote:Thanks for your response!
Can I check with 'Non indexed' on any of the listing paramater ? If yes then could you please assist me on that.
Use
Code: Select all
"TSO LISTCAT ENTRIES('TEST.ABC.DEF.GHI')"
For VSAM, you should get something like this:
Code: Select all
CLUSTER ------- TEST.ABC.DEF.GHI
IN-CAT --- CATALOG.USER.SUB2.TEST
DATA ------- TEST.ABC.DEF.GHI.DATA
IN-CAT --- CATALOG.USER.SUB2.TEST
INDEX ------ TEST.ABC.DEF.GHI.INDEX
IN-CAT --- CATALOG.USER.SUB2.TEST
Keyword for VSAM in this output is: CLUSTER (and also DATA, INDEX in following lines).
If not-VSAM, you'll get NON-VSAM.
Re: Need to check whether file is ESDS file or not by using
Posted: Tue Oct 08, 2024 12:28 am
by willy jensen
Should have mentioned that those sections are only shown if you do a LISTCAT ENT('name') ALL.
Or like in Segeykens sample, if the 'INDEX --' is missing then it is not indexed.
Re: Need to check whether file is ESDS file or not by using
Posted: Tue Oct 08, 2024 5:25 pm
by sergeyken
You can also try
Code: Select all
"TSO LISTCAT LEVEL('hlq-prefix') CLUSTER and/or DATA and/or INDEX"
Do something yourself, do not wait for help from heaven.