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

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


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Mar 08, 2013 9:50 am
Reply with quote

Download IBM Redbook VSAM Demystified -

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
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

Superior Member


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

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

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

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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Mar 08, 2013 1:02 pm
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: 8797
Location: Welsh Wales

PostPosted: Fri Mar 08, 2013 1:11 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Fri Mar 08, 2013 1:59 pm
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
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 Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Fri Mar 08, 2013 2:48 pm
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: 8797
Location: Welsh Wales

PostPosted: Fri Mar 08, 2013 3:07 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Mar 08, 2013 3:13 pm
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: 8797
Location: Welsh Wales

PostPosted: Fri Mar 08, 2013 3:49 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
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
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top