Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to calculate used space(cylinders) in vsam and ps file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Pavankumar.m
Warnings : 1

New User


Joined: 28 Nov 2010
Posts: 53
Location: Mumbai

PostPosted: Fri Mar 08, 2013 9:03 am    Post subject: how to calculate used space(cylinders) in vsam and ps file
Reply with quote

hi ,

I am trying to find out used cylinders in one of my vsam file, for this I am looking into listcat entries.

but I am not able to calculate the exactly used cylinders in that file. Could any one please help me out with calculaton.

below are few details from listcat entries.
allocated cylinders:
Code:
space-pri 500
space-sec 500

hi-a-rba :5529600000
hi-u-rba:5526650880

freespc :1108445184

max rec len-14000


thanks,
kumar

Code'd
Back to top
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Mar 08, 2013 9:50 am    Post subject: Reply to: how to calculate used space(cylinders) in vsam and
Reply with quote

Download IBM Redbook VSAM Demystified -

http://www.redbooks.ibm.com/abstracts/sg246105.html
Back to top
View user's profile Send private message
Pavankumar.m
Warnings : 1

New User


Joined: 28 Nov 2010
Posts: 53
Location: Mumbai

PostPosted: Fri Mar 08, 2013 10:13 am    Post subject: Reply to: how to calculate used space(cylinders) in vsam and
Reply with quote

hi bill,

thanks for your link,

I am going thru it but not getting exact formula for used space calculation, can you please provide me formula for used cylinders in vsam file using provided information in my first post.

thanks ,
pavan
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Mar 08, 2013 12:06 pm    Post subject:
Reply with quote

You'll do a lot good for yourself if you get enganged with that manual, however, here is a shortcut:

http://www.talsystems.com/tsihome_html/techcorner.html
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Fri Mar 08, 2013 1:02 pm    Post subject: Reply to: how to calculate used space(cylinders) in vsam and
Reply with quote

Pavankumar.m,

Why do you want to do this for a VSAM file?

Do you, like your title, what to do it for a PS as well? Why? What problem do you have?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Mar 08, 2013 1:11 pm    Post subject:
Reply with quote

The formula I use is, and is reasonably accurate

(HURBA / HARBA) = ratio used
total cyls * ratio used = actual used

HERE is a link to a REXX solution if you have lots of files to look at
Back to top
View user's profile Send private message
Pavankumar.m
Warnings : 1

New User


Joined: 28 Nov 2010
Posts: 53
Location: Mumbai

PostPosted: Fri Mar 08, 2013 1:25 pm    Post subject: Reply to: how to calculate used space(cylinders) in vsam and
Reply with quote

hi bill,

In my shop we were allocated many files with cylinder space, irrespective of how much actually needed,

due to this we were getting dasd space issue.
here im trying to calculate actual cylinders used by each of the file.
so that I can reallocate those files.

in my shop we use mostly vsam files more , so I specfied the vsam in my post.

thanks,
pavan.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Mar 08, 2013 1:59 pm    Post subject:
Reply with quote

You may wish to discuss this problem with your storage management team, perhaps to use free space release for files that are grossly over allocated.

Why use readily available automatic solutions when you can waste time and do it manually icon_rolleyes.gif
Back to top
View user's profile Send private message
Pavankumar.m
Warnings : 1

New User


Joined: 28 Nov 2010
Posts: 53
Location: Mumbai

PostPosted: Fri Mar 08, 2013 2:09 pm    Post subject: Reply to: how to calculate used space(cylinders) in vsam and
Reply with quote

hi expat,

I followed your formula as below.

file attributes:-
space -pri : 1
space-sec : 10

max-lrecl: 14000
total rec: 7

hi-a-rba: 829440
hi-u-rba: 829440

using above listcat entries I did below falcon:

total cylinders allocated: 1+10*15 :151

hurba/harba :ratio
829440/829440 : 1

used cylinders: 1 * 151 : 151 cyls

in my input file I have only 7 records. I don't think 7 records can use this much space.

please correct me if my calculation is wrong..if wrong please provide me correct calculation.

thanks,
pavan.
Back to top
View user's profile Send private message
Pete Wilson

Active User


Joined: 31 Dec 2009
Posts: 437
Location: London

PostPosted: Fri Mar 08, 2013 2:48 pm    Post subject:
Reply with quote

What a file has allocated is just that, it is what space it is using. It is irrelevent how many or how large the records in it may be. If there are only a few small records in the file it just means that space within the allocated space is not being used, but as it is still allocated space it is not available for other files to be allocated in.

In the example you provided, HARBA = 5529600000, which is the total number of bytes allocated to the dataset. Just divide this by 1024 for KB, again by 1024 for MB and so on.

You might want to have a look at using ISMF to get your figures in Kilobytes rather than trying to calculate them from cylinders.

However a simple basic calculation in Excel is: =(cyls*15)*56664 /1024/1024 which will give you a Megabyte figure for the number of cylinders you're dealing with. (The 56664 is track capacity in bytes) This is not 100% accurate but sufficient for your needs I suspect.

You need to talk to your Storage Team. They should have all sort of utilities to use to get the information.

And if files are being grossly overallocated that is an education issue for the User community to understand properly what they need and request just that. You might want to investigate using more Compression through your Dataclases as well. If that doesn't help it's a capacity issue, i.e. buy more DASD.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Mar 08, 2013 3:07 pm    Post subject:
Reply with quote

From the figures given, the file has ONE cylinder allocated.

Where on earth did 151 cylinders suddenly appear from icon_confused.gif
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Fri Mar 08, 2013 3:13 pm    Post subject: Reply to: how to calculate used space(cylinders) in vsam and
Reply with quote

Code:
space-pri 500
space-sec 500

hi-a-rba :5,529,600,000
hi-u-rba:5,526,650,880

freespc :1,108,445,184

max rec len-14000


To expand on what Pete has said, using your example. You have just over 5.5 gigabytes allocated. This is the space "used" by the file. You have three megabytes fewer that is "used" by the data in the file plus the "freespace". Once those three megabytes are taken, then the file will again go to "secondary allocation".

On that basis, your VSAM file is currently pretty "full". However, when you take the "freespc" into account, it looks like your file is defined with 20% of "free space" per CA and, unless recently loaded/reorg'ed, it's not really using much of the "free space", in which case you could have a space saving of 20% close-at-hand on that file alone. The "max rec len" is pretty horrible for a VSAM file. Look at the size of the CA used for the data. Do you have an "avg" record length, or are they all that long? Batch-only file, I hope?

Perhaps if you post a full LISTCAT of that file, we can point up some areas for you to concentrate on in the VSAM Demystified.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Mar 08, 2013 3:49 pm    Post subject:
Reply with quote

Bill, methinks this is going round in circles not helped by the fact that the OP has posted a completely different set of figures in the second example.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us