Page 1 of 1

Find the free CA space for a VSAM file or catalog.

Posted: Fri Jun 23, 2017 2:40 pm
by Pradeep Kumar
Hi,

Can we find the free CA space for a VSAM file or catalog using REXX. If yes, could you please help to write a REXX code or some direction to write one.

Re: Find the free CA space for a VSAM file or catalog.

Posted: Fri Jun 23, 2017 5:58 pm
by Robert Sample
You can find the free CA space for a VSAM data set (z/OS only has files on tape or in Unix; referring to a VSAM data set as a "VSAM file" is WRONG) simply by running a LISTCAT and subtracting the HI-U-RBA from the HI-A-RBA. A REXX program is not needed but you could write one to parse the output of LISTCAT and extract the two numbers from it. Note that free CA space may be quite different from the total free space.

Re: Find the free CA space for a VSAM file or catalog.

Posted: Sun May 06, 2018 8:15 pm
by Pradeep Kumar
Robert Sample wrote: Fri Jun 23, 2017 5:58 pmNote that free CA space may be quite different from the total free space.
Thanks for you answer but what is the meaning of this statement?

Re: Find the free CA space for a VSAM file or catalog.

Posted: Mon May 07, 2018 4:55 am
by Robert Sample
You may have free space in the CI as well as in the CA. Furthermore, if there have been CA splits then there can be CA free space that is considered part of the HI-U-RBA value. So merely knowing the amount of free CA space does not indicate that you know the free space in the data set; the free space value in a LISTCAT may thus be quite different from the difference between HI-A-RBA and HI-U-RBA.

Re: Find the free CA space for a VSAM file or catalog.

Posted: Wed May 23, 2018 2:02 pm
by Pradeep Kumar
Robert Sample wrote: Mon May 07, 2018 4:55 amYou may have free space in the CI as well as in the CA. Furthermore, if there have been CA splits then there can be CA free space that is considered part of the HI-U-RBA value. So merely knowing the amount of free CA space does not indicate that you know the free space in the data set; the free space value in a LISTCAT may thus be quite different from the difference between HI-A-RBA and HI-U-RBA.
Thanks Robert.

so if I really want to know the 'real' free space, I should look at the difference between HI-U-RBA and HI-A-RBA, is that right?

Re: Find the free CA space for a VSAM file or catalog.

Posted: Wed May 23, 2018 8:36 pm
by Robert Sample
so if I really want to know the 'real' free space, I should look at the difference between HI-U-RBA and HI-A-RBA, is that right?
This is the EXACT opposite of what I said. Look at the LISTCAT output for the freespace value -- that will be a more accurate value. I have seen cases where the HI-U-RBA and HI-A-RBA have the same value, yet LISTCAT shows there to be 25% freespace in the data set.