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

Calculation of free space available in a VSAM File


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

Active User


Joined: 14 Dec 2008
Posts: 107
Location: India

PostPosted: Fri May 21, 2010 10:22 am
Reply with quote

Hi All,

We have a set of many VSAM files in our application. There will be online and batch updates to these VSAM files everyday. I am assigned to develop a tool or a job which can tell the percentage of space the VSAM file has used.

I found a post in IBMMAINFRAMES that the below formula from the information from IDCAMS for a VSAM file:

(HI-U-RBA/HI-A-RBA)*100

gives the usage percentage. But this will give the usage for one extent only. Can someone please let me know how to go about finding the exact way to approach this? I apologize if this is a repost, i didnt find a previous post on this.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri May 21, 2010 11:43 am
Reply with quote

Why do you say that the statistics are for one extent only
Back to top
View user's profile Send private message
hiravibk
Warnings : 1

Active User


Joined: 14 Dec 2008
Posts: 107
Location: India

PostPosted: Fri May 21, 2010 11:59 am
Reply with quote

I checked with the Storage management group here and this is the reply I got from them. They were not very generous to let me know how exactly to go about the approach icon_smile.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri May 21, 2010 12:03 pm
Reply with quote

Then all I can say is that your storage management should not be allowed to manage the storage environment.
In fact they do not sound bright enough to be allowed to go to the toilet unsupervised.

Take a good look at the output from a listcat and see what you can find.
Back to top
View user's profile Send private message
hiravibk
Warnings : 1

Active User


Joined: 14 Dec 2008
Posts: 107
Location: India

PostPosted: Fri May 21, 2010 12:16 pm
Reply with quote

Hi expat,

So are you saying that the formula that I have given is correct for a KSDS VSAM file?

Below is the LISTCAT info for one of the files:

Code:
IDCAMS  SYSTEM SERVICES                                     
       SPACE-TYPE------CYLINDER     HI-A-RBA-----12510904320
       SPACE-PRI-----------1100     HI-U-RBA-----12432752640
       SPACE-SEC------------550                             


Please let me know if I need to consider any other options from LISTCAT. I also need to add that a REORG is done on a weekly basis to all the VSAM files in our system.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri May 21, 2010 12:29 pm
Reply with quote

Redbook "VSAM Demystified" will give you some nice information.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri May 21, 2010 12:45 pm
Reply with quote

It's the very same one that I have used for 20+ years with no problems.

As for reorganising the file on a weekly basis - is it really worth it. Almost certainly not from a performance view. Possibly from a space reclamation view.
Back to top
View user's profile Send private message
hiravibk
Warnings : 1

Active User


Joined: 14 Dec 2008
Posts: 107
Location: India

PostPosted: Fri May 21, 2010 12:52 pm
Reply with quote

Thanks expat, I will go ahead and use the same formula.
Thank you Peter for the document, it looks really good.

Code:
STATISTICS                                             
  REC-TOTAL---------916195     SPLITS-CI----------13333
  REC-DELETED-------169187     SPLITS-CA------------290
  REC-INSERTED------369899     FREESPACE-%CI---------15
  REC-UPDATED------2679357     FREESPACE-%CA---------15
  REC-RETRIEVED--655260325     FREESPC--------288489472
  USER-DATA-SIZE-----------------------------1191053500

Code:
STATISTICS                                             
  REC-TOTAL------------694     SPLITS-CI------------290
  REC-DELETED------------0     SPLITS-CA--------------6
  REC-INSERTED-----------0     FREESPACE-%CI----------0
  REC-UPDATED---------2760     FREESPACE-%CA----------0
  REC-RETRIEVED---------69     FREESPC-----------428032


I also see two 'FREESPC' in the listcat entry. Will this parameter help in anyway or is it something else. Also, I am confused why we have two entries with different values for this.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri May 21, 2010 12:56 pm
Reply with quote

I guess one is for the data component and one is for the index component?
Back to top
View user's profile Send private message
hiravibk
Warnings : 1

Active User


Joined: 14 Dec 2008
Posts: 107
Location: India

PostPosted: Fri May 21, 2010 4:29 pm
Reply with quote

I have not worked on REXX, can comeone help me with the REXX code for this.

Thanks!
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri May 21, 2010 4:48 pm
Reply with quote

hiravibk wrote:
I have not worked on REXX, can comeone help me with the REXX code for this.
Well, that is rather a little handicap - not having worked with REXX before.

At the top of the CLIST / REXX forum is a sticky with links to all of the manuals that you are likely ever to need for REXX. Have a read and a try yourself and we will be happy to help those that try to help themselves.
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