Page 1 of 1

calculating esds file size using tracks and extent info

PostPosted: Wed Apr 21, 2010 10:43 pm
by Savita
Hi,
Can anyone tell me how to calculate size of a esds file using the information such as total tracks and extents used. Suppose my file is esds with tracks used: 7500 and extents: 3, files has ang and max rec length: 4096.

Re: calculating esds file size using tracks and extent info

PostPosted: Wed Apr 21, 2010 11:09 pm
by Robert Sample
Go to http://www.redbooks.ibm.com and find the VSAM Demystified manual. Read it.

Are you wanting to know the allocated space for the ESDS? Run a LISTCAT.

Are you wanting to know the space used within the allocated space for the ESDS? Run a LISTCAT.

Why are you wanting to calculate anything when the system will provide you the data you want already?

Re: calculating esds file size using tracks and extent info

PostPosted: Thu Apr 22, 2010 12:10 pm
by Savita
Actually i want to know the esds file size in giga bytes...as we can't ftp vsam file to windows..i wanted to know if there is any to calculate files size in giga bytes..to have data accordingly managed in file and to know the size of file in gigabytes i asked this query..
Can anyone tell me the way to know the files size in gigabytes/bytes with above mentioned parameters for file

Re: calculating esds file size using tracks and extent info

PostPosted: Thu Apr 22, 2010 5:52 pm
by Robert Sample
Do a LISTCAT. Find the High Used RBA (HI-U-RBA) in the LISTCAT output. This is in bytes, so divide by 1024. Divide by 1024 again. Divide by 1024 again. The number has now been converted to gigabytes.

Re: calculating esds file size using tracks and extent info

PostPosted: Thu Apr 22, 2010 11:40 pm
by dick scherrer
Hello,

If you are unwilling to run IDCAMS/LISTCAT and use that info, you can always SORT (copy) the vsam file to a dummy output and get numbers you can use from the informational output generated by the copy. . .

Re: calculating esds file size using tracks and extent info

PostPosted: Mon Apr 26, 2010 5:49 pm
by Bad Man
Please pardon my interference and correct me if I am wrong.

Savita How did u get the above said parameters... Tracks=7500( I think using an info on data)

I did a listcat for a random file and found

HI-A-RBA---------1290240
HI-U-RBA----------169984

I read VSAM demystified and it says:

A RBA is the allocated space
U RBA is the used space

Also there is a way to convert tracks to GB but I think when dealing with VSAM LISTCAT is your good option.
1 track = 56664 bytes.

Re: calculating esds file size using tracks and extent info

PostPosted: Mon Apr 26, 2010 7:19 pm
by Robert Sample
Also there is a way to convert tracks to GB but I think when dealing with VSAM LISTCAT is your good option.
1 track = 56664 bytes.
This will only give you an approximation. Using the block size (CI size for a VSAM file), and GX26-4577 (the 3390 reference guide), you can find the exact number of bytes -- but this does require the ability to determine the number of blocks per track (12 4096 blocks fit in a track, for example -- so with a 4K CI or block size, a file is only using 48152 bytes of the 56664 per track).