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.
Need to check whether file is ESDS file or not by using REXX
-
Devrana
- Posts: 17
- Joined: Tue May 17, 2022 12:57 pm
- Skillset: Mainframe Developer
- Referer: Through Colleague
- sergeyken
- Posts: 473
- Joined: Wed Jul 24, 2019 10:12 pm
- Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
- Referer: Internet search
Re: Need to check whether file is ESDS file or not by using
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 IJavas and Pythons come and go, but JCL and SORT stay forever.
-
Devrana
- Posts: 17
- Joined: Tue May 17, 2022 12:57 pm
- Skillset: Mainframe Developer
- Referer: Through Colleague
Re: Need to check whether file is ESDS file or not by using
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.
Can I check with 'Non indexed' on any of the listing paramater ? If yes then could you please assist me on that.
-
willy jensen
- Posts: 481
- Joined: Thu Mar 10, 2016 5:03 pm
- Skillset: assembler rexx zOS ispf racf smf
- Referer: saw it in the experts foprum thought I could help here
Re: Need to check whether file is ESDS file or not by using
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.
- sergeyken
- Posts: 473
- Joined: Wed Jul 24, 2019 10:12 pm
- Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
- Referer: Internet search
Re: Need to check whether file is ESDS file or not by using
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.
Javas and Pythons come and go, but JCL and SORT stay forever.
-
willy jensen
- Posts: 481
- Joined: Thu Mar 10, 2016 5:03 pm
- Skillset: assembler rexx zOS ispf racf smf
- Referer: saw it in the experts foprum thought I could help here
Re: Need to check whether file is ESDS file or not by using
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.
Or like in Segeykens sample, if the 'INDEX --' is missing then it is not indexed.
- sergeyken
- Posts: 473
- Joined: Wed Jul 24, 2019 10:12 pm
- Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
- Referer: Internet search
Re: Need to check whether file is ESDS file or not by using
You can also try
Do something yourself, do not wait for help from heaven.
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.
Javas and Pythons come and go, but JCL and SORT stay forever.
-
Devrana
- Posts: 17
- Joined: Tue May 17, 2022 12:57 pm
- Skillset: Mainframe Developer
- Referer: Through Colleague
Re: Need to check whether file is ESDS file or not by using REXX
How can we check the KSDS VSAM file size by using LISTCAT parameters?
- sergeyken
- Posts: 473
- Joined: Wed Jul 24, 2019 10:12 pm
- Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
- Referer: Internet search
Re: Need to check whether file is ESDS file or not by using REXX
Devrana wrote:How can we check the KSDS VSAM file size by using LISTCAT parameters?
Did you try to issue the command, like this one?
Code: Select all
listcat entries( 'TEST.CICS.AAA.BBB') all Take a look at the result, and try to find the information you need.
(For KSDS dataset you will find other listed data as well, for INDEX - besides of DATA)
Code: Select all
CLUSTER ------- TEST.CICS.AAA.BBB
IN-CAT --- CATALOG.USER.XXX.YYY
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2014.209
RELEASE----------------2 EXPIRATION------0000.000
SMSDATA
STORAGECLASS ----XXXXXXX MANAGEMENTCLASS---XXXXXX
DATACLASS --------XXXXXX LBACKUP ---2025.212.2128
EATTR-------------(NULL)
BWO STATUS------00000000 BWO TIMESTAMP---00000 00:00:00.0
BWO-------------------NO
RLSDATA
LOG ------------------NONE RECOVERY REQUIRED --(NO) FRLOG ------------(NULL)
VSAM QUIESCED -------(NO) RLS IN USE --------(YES) LOGREPLICATE-------------(NO)
LOGSTREAMID-----------------------------(NULL)
RECOVERY TIMESTAMP LOCAL-----X'0000000000000000'
RECOVERY TIMESTAMP GMT-------X'0000000000000000'
DATABASE -----------------(NULL)
KEYNAMES -----------------(NULL)
ENCRYPTIONDATA
DATA SET ENCRYPTION-----(NO)
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
DATA-----TEST.CICS.AAA.BBB.DATA
IN-CAT --- CATALOG.USER.XXX.YYY
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2014.209
RELEASE----------------2 EXPIRATION------0000.000
ACCOUNT-INFO-----------------------------------(NULL)
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
CLUSTER--CATALOG.USER.XXX.YYY
ATTRIBUTES
KEYLEN-----------------0 AVGLRECL-------------500 BUFSPACE------------8192 CISIZE--------------4096
RKP--------------------0 MAXLRECL-------------500 EXCPEXIT----------(NULL) CI/CA----------------180
RECORDS/CI-------------8 MAXRECS-------4294967295
STRIPE-COUNT-----------1
SHROPTNS(2,3) SPEED UNIQUE NOERASE NUMBERED NOWRITECHK UNORDERED REUSE
NONSPANNED EXTENDED EXT-ADDR
STATISTICS
REC-TOTAL-----------5760 SPLITS-CI--------------0 EXCPS------------------4
REC-DELETED------------0 SPLITS-CA--------------0 EXTENTS----------------1
REC-INSERTED-----------1 FREESPACE-%CI----------0 SYSTEM-TIMESTAMP:
REC-UPDATED------------0 FREESPACE-%CA----------0 X'E145EB69E9D4AD40'
REC-RETRIEVED----------0 FREESPC----------------0
ALLOCATION
SPACE-TYPE------CYLINDER HI-A-RBA---------2949120
SPACE-PRI--------------4 HI-U-RBA---------2949120
SPACE-SEC--------------0
VOLUME
VOLSER------------TSM018 PHYREC-SIZE---------4096 HI-A-RBA---------2949120 EXTENT-NUMBER----------1
DEVTYPE------X'3010200F' PHYRECS/TRK-----------12 HI-U-RBA---------2949120 EXTENT-TYPE--------X'40'
VOLFLAG------------PRIME TRACKS/CA-------------15
EXTENTS:
LOW-CCHH-----X'03A80000' LOW-RBA----------------0 TRACKS----------------60
HIGH-CCHH----X'03AB000E' HIGH-RBA---------2949119
VOLUME
VOLSER-----------------* PHYREC-SIZE------------0 HI-A-RBA---------------0 EXTENT-NUMBER----------0
DEVTYPE------X'3010200F' PHYRECS/TRK------------0 HI-U-RBA---------------0 EXTENT-TYPE--------X'FF'
VOLFLAG--------CANDIDATE TRACKS/CA--------------0
VOLUME
VOLSER-----------------* PHYREC-SIZE------------0 HI-A-RBA---------------0 EXTENT-NUMBER----------0
DEVTYPE------X'3010200F' PHYRECS/TRK------------0 HI-U-RBA---------------0 EXTENT-TYPE--------X'FF'
VOLFLAG--------CANDIDATE TRACKS/CA--------------0
VOLUME
VOLSER-----------------* PHYREC-SIZE------------0 HI-A-RBA---------------0 EXTENT-NUMBER----------0
DEVTYPE------X'3010200F' PHYRECS/TRK------------0 HI-U-RBA---------------0 EXTENT-TYPE--------X'FF'
VOLFLAG--------CANDIDATE TRACKS/CA--------------0
VOLUME
VOLSER-----------------* PHYREC-SIZE------------0 HI-A-RBA---------------0 EXTENT-NUMBER----------0
DEVTYPE------X'3010200F' PHYRECS/TRK------------0 HI-U-RBA---------------0 EXTENT-TYPE--------X'FF'
VOLFLAG--------CANDIDATE TRACKS/CA--------------0 Javas and Pythons come and go, but JCL and SORT stay forever.
-
Devrana
- Posts: 17
- Joined: Tue May 17, 2022 12:57 pm
- Skillset: Mainframe Developer
- Referer: Through Colleague
Re: Need to check whether file is ESDS file or not by using REXX
I have seen the details of listact but I am not sure, which parameter of listcat can we use to calculate the size of KSDS VSAM file?
-
- Similar Topics
- Replies
- Views
- Last post
-
- 0
- 5090
-
by zeller56
View the latest post
Sun Oct 01, 2023 1:50 am
-
- 10
- 9569
-
by chillmo
View the latest post
Thu Mar 13, 2025 12:01 am
-
- 24
- 14119
-
by Pedro
View the latest post
Wed Jan 04, 2023 5:59 am
-
- 6
- 3025
-
by sergeyken
View the latest post
Wed Apr 13, 2022 7:01 pm
-
-
z/OS to Win FTP, why file encoding ANSI / UTF-8?
by jcbrotel » Mon Feb 21, 2022 2:01 pm » in All other IBM Tools - 0
- 3087
-
by jcbrotel
View the latest post
Mon Feb 21, 2022 2:01 pm
-