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

Time Sharing Option, Interactive System Productivity Facility and REstructured eXtended eXecutor

Moderator: mickeydusaor

Post Reply
User avatar
Pradeep Kumar
Registered Member
Posts: 15
Joined: Sat Aug 16, 2014 11:25 pm

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

Post 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.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1891
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

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

Post 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.
User avatar
Pradeep Kumar
Registered Member
Posts: 15
Joined: Sat Aug 16, 2014 11:25 pm

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

Post 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?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1891
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

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

Post 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.
User avatar
Pradeep Kumar
Registered Member
Posts: 15
Joined: Sat Aug 16, 2014 11:25 pm

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

Post 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?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1891
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

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

Post 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.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “TSO, ISPF & REXX (Do you still do CLIST?!).”