View previous topic :: View next topic
|
Author |
Message |
mrgnndhmk
New User
Joined: 01 Feb 2006 Posts: 51 Location: India
|
|
|
|
Hi All,
I searched in the forum for my answers but I did not quite get it. Therefore, posting the questions.
1. In LISTCAT, I have the following scenarios
Code: |
1. HI-A-RBA = HI-U-RBA and FREESPC > 0
2. HI-A-RBA <> HI-U-RBA and FREESPC <> (HI-A-RBA - HI-U-RBA)
3. HI-A-RBA <> HI-U-RBA and FREESPC = (HI-A-RBA - HI-U-RBA))
|
On what basis FREESPC could be different from HI-A-RBA - HI-U-RBA?
Should I take the RBA from Allocation section or the Volume section?
Ultimately I want one single method to compute the Free Space/Used Space for the VSAM Files.
I have given example for each of the above scenario
Scenario 1 (Data) & 3 (Index):
Code: |
LISTCAT ENTRIES(PAD.ADPOUR.KSDS ) ALL
0CLUSTER ------- PAD.ADPOUR.KSDS
IN-CAT --- UCAT.ORDER.PROD
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2010.241
RELEASE----------------2 EXPIRATION------0000.000
SMSDATA
STORAGECLASS -------PROD MANAGEMENTCLASS-----PROD
DATACLASS --------(NULL) LBACKUP ---0000.000.0000
CA-RECLAIM---------(YES)
EATTR-------------(NULL)
BWO STATUS------00000000 BWO TIMESTAMP---00000 00:00:00.0
BWO---------------(NULL)
RLSDATA
LOG ----------------(NULL) RECOVERY REQUIRED --(NO) FRLOG ------------(NULL)
VSAM QUIESCED -------(NO) RLS IN USE ---------(NO) LOGREPLICATE-------------(NO)
0 LOGSTREAMID-----------------------------(NULL)
RECOVERY TIMESTAMP LOCAL-----X'0000000000000000'
RECOVERY TIMESTAMP GMT-------X'0000000000000000'
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
DATA-----PAD.ADPOUR.DATA
INDEX----PAD.ADPOUR.INDEX
0 DATA ------- PAD.ADPOUR.DATA
IN-CAT --- UCAT.ORDER.PROD
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2010.241
1IDCAMS SYSTEM SERVICES TIME: 14:37:40 04/21/17 PAGE 4
0 RELEASE----------------2 EXPIRATION------0000.000
ACCOUNT-INFO-----------------------------------(NULL)
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
CLUSTER--PAD.ADPOUR.KSDS
ATTRIBUTES
KEYLEN-----------------6 AVGLRECL--------------30 BUFSPACE-----------40960 CISIZE-------------18432
RKP--------------------0 MAXLRECL--------------30 EXCPEXIT----------(NULL) CI/CA-----------------45
SHROPTNS(2,3) SPEED UNIQUE NOERASE INDEXED NOWRITECHK UNORDERED NOREUSE
NONSPANNED
STATISTICS
REC-TOTAL----------37331 SPLITS-CI--------------4 EXCPS---------------1370
REC-DELETED----------187 SPLITS-CA--------------1 EXTENTS----------------3
REC-INSERTED---------332 FREESPACE-%CI----------1 SYSTEM-TIMESTAMP:
REC-UPDATED------------0 FREESPACE-%CA----------0 X'C83F9CD5A79A3280'
REC-RETRIEVED-------3743 FREESPC----------1271808
ALLOCATION
SPACE-TYPE------CYLINDER HI-A-RBA---------2488320
SPACE-PRI--------------1 HI-U-RBA---------2488320
SPACE-SEC--------------1
VOLUME
VOLSER------------DOF087 PHYREC-SIZE--------18432 HI-A-RBA---------2488320 EXTENT-NUMBER----------3
DEVTYPE------X'3010200F' PHYRECS/TRK------------3 HI-U-RBA---------2488320 EXTENT-TYPE--------X'00'
VOLFLAG------------PRIME TRACKS/CA-------------15
EXTENTS:
LOW-CCHH-----X'003E0000' LOW-RBA----------------0 TRACKS----------------15
HIGH-CCHH----X'003E000E' HIGH-RBA----------829439
LOW-CCHH-----X'00440000' LOW-RBA-----------829440 TRACKS----------------15
HIGH-CCHH----X'0044000E' HIGH-RBA---------1658879
LOW-CCHH-----X'00610000' LOW-RBA----------1658880 TRACKS----------------15
HIGH-CCHH----X'0061000E' HIGH-RBA---------2488319
0 INDEX ------ PAD.ADPOUR.INDEX
IN-CAT --- UCAT.ORDER.PROD
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2010.241
RELEASE----------------2 EXPIRATION------0000.000
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
CLUSTER--PAD.ADPOUR.KSDS
ATTRIBUTES
KEYLEN-----------------6 AVGLRECL---------------0 BUFSPACE---------------0 CISIZE--------------1024
RKP--------------------0 MAXLRECL------------1017 EXCPEXIT----------(NULL) CI/CA-----------------33
SHROPTNS(2,3) RECOVERY UNIQUE NOERASE NOWRITECHK UNORDERED NOREUSE
STATISTICS
REC-TOTAL--------------4 SPLITS-CI--------------1 EXCPS----------------432 INDEX:
REC-DELETED------------0 SPLITS-CA--------------0 EXTENTS----------------1 LEVELS-----------------2
REC-INSERTED-----------0 FREESPACE-%CI----------0 SYSTEM-TIMESTAMP: ENTRIES/SECT-----------6
REC-UPDATED------------6 FREESPACE-%CA----------0 X'C83F9CD5A79A3280' SEQ-SET-RBA----------------0
REC-RETRIEVED----------0 FREESPC------------29696 HI-LEVEL-RBA------------2048
ALLOCATION
1IDCAMS SYSTEM SERVICES TIME: 14:37:40 04/21/17 PAGE 5
0 SPACE-TYPE---------TRACK HI-A-RBA-----------33792
SPACE-PRI--------------1 HI-U-RBA------------4096
SPACE-SEC--------------1
VOLUME
VOLSER------------DOF087 PHYREC-SIZE---------1024 HI-A-RBA-----------33792 EXTENT-NUMBER----------1
DEVTYPE------X'3010200F' PHYRECS/TRK-----------33 HI-U-RBA------------4096 EXTENT-TYPE--------X'00'
VOLFLAG------------PRIME TRACKS/CA--------------1
EXTENTS:
LOW-CCHH-----X'000B0007' LOW-RBA----------------0 TRACKS-----------------1
HIGH-CCHH----X'000B0007' HIGH-RBA-----------33791
1IDCAMS SYSTEM SERVICES TIME: 14:37:40 04/21/17 PAGE 6
0 THE NUMBER OF ENTRIES PROCESSED WAS:
AIX -------------------0
ALIAS -----------------0
CLUSTER ---------------1
DATA ------------------1
GDG -------------------0
INDEX -----------------1
NONVSAM ---------------0
PAGESPACE -------------0
PATH ------------------0
SPACE -----------------0
USERCATALOG -----------0
TAPELIBRARY -----------0
TAPEVOLUME ------------0
TOTAL -----------------3
0 THE NUMBER OF PROTECTED ENTRIES SUPPRESSED WAS 0
0IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0
0 |
Scenario 2 (Data) & 3 (Index):
Code: |
LISTCAT ENTRIES(PAD.ADRSLT.KSDS ) ALL
0CLUSTER ------- PAD.ADRSLT.KSDS
IN-CAT --- UCAT.ORDER.PROD
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2010.241
RELEASE----------------2 EXPIRATION------0000.000
SMSDATA
STORAGECLASS -------PROD MANAGEMENTCLASS-----PROD
DATACLASS --------(NULL) LBACKUP ---0000.000.0000
CA-RECLAIM---------(YES)
EATTR-------------(NULL)
BWO STATUS------00000000 BWO TIMESTAMP---00000 00:00:00.0
BWO---------------(NULL)
RLSDATA
LOG ----------------(NULL) RECOVERY REQUIRED --(NO) FRLOG ------------(NULL)
VSAM QUIESCED -------(NO) RLS IN USE ---------(NO) LOGREPLICATE-------------(NO)
0 LOGSTREAMID-----------------------------(NULL)
RECOVERY TIMESTAMP LOCAL-----X'0000000000000000'
RECOVERY TIMESTAMP GMT-------X'0000000000000000'
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
DATA-----PAD.ADRSLT.DATA
INDEX----PAD.ADRSLT.INDEX
0 DATA ------- PAD.ADRSLT.DATA
IN-CAT --- UCAT.ORDER.PROD
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2010.241
1IDCAMS SYSTEM SERVICES TIME: 14:37:40 04/21/17 PAGE 7
0 RELEASE----------------2 EXPIRATION------0000.000
ACCOUNT-INFO-----------------------------------(NULL)
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
CLUSTER--PAD.ADRSLT.KSDS
ATTRIBUTES
KEYLEN----------------11 AVGLRECL-------------640 BUFSPACE-----------43008 CISIZE--------------7168
RKP--------------------8 MAXLRECL-------------640 EXCPEXIT----------(NULL) CI/CA----------------105
SHROPTNS(2,3) SPEED UNIQUE NOERASE INDEXED NOWRITECHK UNORDERED NOREUSE
NONSPANNED
STATISTICS
REC-TOTAL---------278105 SPLITS-CI--------------0 EXCPS---------------2152
REC-DELETED------------0 SPLITS-CA--------------0 EXTENTS----------------1
REC-INSERTED-----------0 FREESPACE-%CI---------23 SYSTEM-TIMESTAMP:
REC-UPDATED------------0 FREESPACE-%CA----------8 X'CD5BB12953A60E00'
REC-RETRIEVED----------0 FREESPC---------40578048
ALLOCATION
SPACE-TYPE------CYLINDER HI-A-RBA-------289766400
SPACE-PRI------------385 HI-U-RBA-------270197760
SPACE-SEC-------------43
VOLUME
VOLSER------------DOF332 PHYREC-SIZE---------7168 HI-A-RBA-------289766400 EXTENT-NUMBER----------1
DEVTYPE------X'3010200F' PHYRECS/TRK------------7 HI-U-RBA-------270197760 EXTENT-TYPE--------X'40'
VOLFLAG------------PRIME TRACKS/CA-------------15
EXTENTS:
LOW-CCHH-----X'03E10000' LOW-RBA----------------0 TRACKS--------------5775
HIGH-CCHH----X'0561000E' HIGH-RBA-------289766399
0 INDEX ------ PAD.ADRSLT.INDEX
IN-CAT --- UCAT.ORDER.PROD
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2010.241
RELEASE----------------2 EXPIRATION------0000.000
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
CLUSTER--PAD.ADRSLT.KSDS
ATTRIBUTES
KEYLEN----------------11 AVGLRECL---------------0 BUFSPACE---------------0 CISIZE--------------2048
RKP--------------------8 MAXLRECL------------2041 EXCPEXIT----------(NULL) CI/CA-----------------21
SHROPTNS(2,3) RECOVERY UNIQUE NOERASE NOWRITECHK UNORDERED NOREUSE
STATISTICS
REC-TOTAL------------362 SPLITS-CI--------------0 EXCPS---------------1814 INDEX:
REC-DELETED------------0 SPLITS-CA--------------0 EXTENTS----------------1 LEVELS-----------------3
REC-INSERTED-----------0 FREESPACE-%CI----------0 SYSTEM-TIMESTAMP: ENTRIES/SECT----------10
REC-UPDATED------------0 FREESPACE-%CA----------0 X'CD5BB12953A60E00' SEQ-SET-RBA----------------0
REC-RETRIEVED----------0 FREESPC-----------118784 HI-LEVEL-RBA----------415744
ALLOCATION
SPACE-TYPE---------TRACK HI-A-RBA----------860160
SPACE-PRI-------------20 HI-U-RBA----------741376
SPACE-SEC--------------3
VOLUME
1IDCAMS SYSTEM SERVICES TIME: 14:37:40 04/21/17 PAGE 8
0 VOLSER------------DOF332 PHYREC-SIZE---------2048 HI-A-RBA----------860160 EXTENT-NUMBER----------1
DEVTYPE------X'3010200F' PHYRECS/TRK-----------21 HI-U-RBA----------741376 EXTENT-TYPE--------X'00'
VOLFLAG------------PRIME TRACKS/CA--------------1
EXTENTS:
LOW-CCHH-----X'00300000' LOW-RBA----------------0 TRACKS----------------20
HIGH-CCHH----X'00310004' HIGH-RBA----------860159
1IDCAMS SYSTEM SERVICES TIME: 14:37:40 04/21/17 PAGE 9
0 THE NUMBER OF ENTRIES PROCESSED WAS:
AIX -------------------0
ALIAS -----------------0
CLUSTER ---------------1
DATA ------------------1
GDG -------------------0
INDEX -----------------1
NONVSAM ---------------0
PAGESPACE -------------0
PATH ------------------0
SPACE -----------------0
USERCATALOG -----------0
TAPELIBRARY -----------0
TAPEVOLUME ------------0
TOTAL -----------------3
0 THE NUMBER OF PROTECTED ENTRIES SUPPRESSED WAS 0
0IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0
|
|
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
First, remember that there is CI freespace and CA freespace. If you specify CI freespace of 20%, that means 20% of each CI is left without any data. If the CI size is 4096 that means about (the VSAM Demystified manual will give you the exact calculation) 820 bytes of each CI is free; if the HI-A-RBA and HI-U-RBA are the same, there is STILL 20% freespace in each CI (unless of course splits occurred).
Second, freespace may be used for records as inserts are done, so freespace may be less than HI-A-RBA minus HI-U-RBA.
Third, freespace in the CI may cause the freespace to be more than HI-A-RBA minus HI-U-RBA.
Quote: |
Should I take the RBA from Allocation section or the Volume section? |
If you use the Volume section, you will need to find the highest single RBA value (there are a low and high RBA for EACH extent on the volume - if there are more than one volume, you will need to find the highest RBA on ALL volumes). If you compare the Allocation and Volume sections for the LISTCAT output you posted, you will see the HI-A-RBA matches the largest Volume RBA (as long as you add 1 to the Volume RBA). So it doesn't matter which you take as long as you pick the largest Volume RBA.
Quote: |
Ultimately I want one single method to compute the Free Space/Used Space for the VSAM Files. |
Subtract free space from HI-A-RBA to give Used space (ignore HI-U-RBA). Divide free space by used space. Two simple calculations, one method. Now the question is, what are you going to do with this number? It has little, if any, practical value. Free space needs to be driven by the application; some applications don't need free space while other applications should have substantial CI free space but little CA free space or vice versa and other applications need substantial CI and CA free space. |
|
Back to top |
|
|
mrgnndhmk
New User
Joined: 01 Feb 2006 Posts: 51 Location: India
|
|
|
|
Thanks Robert - you made the explanation easier.
After reading yours, VSAM Demystified looks demystified.
The reason I come to this forum is, to me you guys are better than the books in simplifying the explanations
Coming to the question on the calculation
- This calculation helps me to identify files which can cause failures potentially based on how it is growing and how it is used.
We have around 1000+ files (KSDS & ESDS) and since our Mainframe is quite stable, we identified only 50+ files which need the redefinition.
More questions
1. Will LISTCAT produce correct result on a file irrespective of whether that file is used by a Job or CICS at the time of issuing LISTCAT?
2. Records Retrieved for Index Component - A file read on DATA internally uses index to retrieve the record. Would this not update the Records Retrieved for Index Component?
~Muru |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
1. Will LISTCAT produce correct result on a file irrespective of whether that file is used by a Job or CICS at the time of issuing LISTCAT? |
No -- if the LISTCAT output has asterisks beside the fields, then they are not accurate and may be changed when the task using the VSAM data set closes it.
Code: |
STATISTICS (* - VALUE MAY BE INCORRECT)
REC-TOTAL------------844* SPLITS-CI-------------22* EXCPS---------------6378*
REC-DELETED----------620* SPLITS-CA--------------1* EXTENTS----------------1
REC-INSERTED--------1386* FREESPACE-%CI----------0 SYSTEM-TIMESTAMP:
REC-UPDATED---------1679* FREESPACE-%CA----------0 X'D27517B1DBF7CD0A'
REC-RETRIEVED------59115* FREESPC----------2686976* |
Quote: |
2. Records Retrieved for Index Component - A file read on DATA internally uses index to retrieve the record. Would this not update the Records Retrieved for Index Component? |
I suspect not in the way you think. Records in the index component are pointers to Data CI, and there may multiple levels of index (depending upon the VSAM data set). I've never looked at the records retrieved for the index component that closely, so I'm not sure if it updates once per data record or once per index CI retrieved. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
2. Records Retrieved for Index Component - A file read on DATA internally uses index to retrieve the record. Would this not update the Records Retrieved for Index Component? |
I had a chance to test this. I created a 2-cylinder VSAM data set with 1000-byte records (1440 of them to be precise) and LISTCAT says I have an index with 3 levels. I then wrote a COBOL program to directly read 1000 records (from 441 to 1440) and then did a LISTCAT. The DATA component showed 1000 REC-RETRIEVED, as expected. The INDEX component showed 0 REC-RETRIEVED. I then changed the program to sequentially read 1000 records. Again, LISTCAT showed the expected 2000 REC-RETRIEVED for the DATA component (1000 direct reads and 1000 sequential reads) and the INDEX component showed 0 REC-RETRIEVED. I'll have to think about INDEX component REC-RETRIEVED and what it means some more.
But the answer to your question is now a definitive no, INDEX component REC-RETRIEVED is not related to the DATA component records retrieved. |
|
Back to top |
|
|
mrgnndhmk
New User
Joined: 01 Feb 2006 Posts: 51 Location: India
|
|
|
|
Thanks Robert.
Quote: |
Edited:
My understanding is that INDEX is inserted, updated & deleted but never read. It is only the Data that is read and Index is always used internally
|
I also confirmed that "REC-RETRIEVED" is always 0 for the INDEX Component.
Did you notice that it is not true for REC-DELETED, REC-INSERTED, REC-UPDATED?
I LISTCAT on a file with Index - It shows asterix for the record count parameters which means it may not be true?
Code: |
0 INDEX ------ PMT.METEST.INDEX
IN-CAT --- UCAT.ORDER.PROD
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2014.279
RELEASE----------------2 EXPIRATION------0000.000
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
CLUSTER--PMT.METEST.KSDS
ATTRIBUTES
KEYLEN----------------14 AVGLRECL---------------0 BUFSPACE---------------0 CISIZE--------------1024
1IDCAMS SYSTEM SERVICES TIME: 14:37:40 04/21/17 PAGE 950
0 RKP--------------------0 MAXLRECL------------1017 EXCPEXIT----------(NULL) CI/CA-----------------33
SHROPTNS(2,3) RECOVERY UNIQUE NOERASE NOWRITECHK UNORDERED NOREUSE
STATISTICS (* - VALUE MAY BE INCORRECT)
REC-TOTAL------------117* SPLITS-CI------------361* EXCPS------------2528925* INDEX:
REC-DELETED----------403* SPLITS-CA--------------1* EXTENTS----------------4 LEVELS-----------------3
REC-INSERTED---------290* FREESPACE-%CI----------0 SYSTEM-TIMESTAMP: ENTRIES/SECT----------10
REC-UPDATED------1416594* FREESPACE-%CA----------0 X'D26B7462804FAB42' SEQ-SET-RBA----------------0
REC-RETRIEVED----------0* FREESPC-----------131072* HI-LEVEL-RBA----------100352
ALLOCATION
SPACE-TYPE---------TRACK HI-A-RBA----------135168
SPACE-PRI--------------1 HI-U-RBA----------119808
SPACE-SEC--------------1
|
[/quote] |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
I did a test with inserting some records into the VSAM KSDS and the REC-UPDATED for the INDEX component was non-zero after the inserts were done.
Quote: |
It shows asterix for the record count parameters which means it may not be true? |
I refer you to this line of the LISTCAT output:
Code: |
STATISTICS (* - VALUE MAY BE INCORRECT) |
I've told you the values you get in the LISTCAT may not be correct, LISTCAT tells you that the values you see may not be correct, and now you're asking again -- how many times are you going to ask for confirmation of what you are being told? When you see "VALUE MAY BE INCORRECT" you can believe what you are being told. The values may be correct but since there is an active update underway the values you see could change at any moment. |
|
Back to top |
|
|
|