IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to find out how much free space is left in a vsam file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
morpheus007

New User


Joined: 27 Dec 2005
Posts: 58

PostPosted: Fri Oct 30, 2009 2:33 am
Reply with quote

I am trying to find out the amount of space used so far and the amount of space left in case of a vsam file.

Please let me know how to determine that.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Fri Oct 30, 2009 2:47 am
Reply with quote

After the file is CLOSED, run a LISTCAT and check the difference in HARBA and HURBA amounts.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Oct 30, 2009 2:49 am
Reply with quote

Hello,

How might this be a jcl question?

You might do a bit of research on LISTDSI. . . The forum search would be a good place to start.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Oct 30, 2009 3:08 am
Reply with quote

The High Allocated RBA (HARBA) in a LISTCAT output gives the number of bytes allocated (technically, the offset to the highest allocated byte). The High Used RBA (HURBA) in a LISTCAT output gives the offset of the highest used byte; the difference is the amount of free space in the file. Is the free space usable? Good question with no easy answer. Maybe -- depending on (average) record length, CI size, CI free space percentage and CA free space percentage. Worst case is that none of the free space is usable -- for example, the record length is 1050 bytes (fixed), the CI size is 4096 and the CI free space percent is 20 percent -- which gives just over 800 bytes per CI free but it is not enough to write a record so none of the free space will be used.

The "amount of space left" in a VSAM file depends -- potentially a VSAM file can be 4 GB if not extended format, much larger if extended format. But the actual amount of space left (i.e., potentially allocatable space) can be affected by the number of extents already used, the number of disk packs the file is on, how many disk packs are candidate volumes, and so forth.

There is an excellent redbook on VSAM called VSAM Demystified that is well worth the time to go through.
Back to top
View user's profile Send private message
morpheus007

New User


Joined: 27 Dec 2005
Posts: 58

PostPosted: Fri Oct 30, 2009 4:19 am
Reply with quote

thanks a lot for the help on this topic. Also i apologize for posting the question in the section.
Back to top
View user's profile Send private message
morpheus007

New User


Joined: 27 Dec 2005
Posts: 58

PostPosted: Fri Oct 30, 2009 4:19 am
Reply with quote

Wrong section
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Oct 30, 2009 4:45 am
Reply with quote

Glad to hear it helped -- and I've moved the topic.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
Search our Forums:

Back to Top