How calculate expected space for VB/V file



Help for IBM's record-oriented filesystem VSAM, ESDS, KSDS, RRDS, LDS and Storage management Subsystems

How calculate expected space for VB/V file

Postby nikesh_rai » Sun Nov 12, 2017 12:57 am

Hi Friends

Please help me to know how to find out expected space that will be taken by a variable length sequential file, when we know the average length and approx. number of records.

I know how to calculate space for fixed length sequential file, but never did for variable length

Thanks
Nikesh Rai
Thanks
Nikesh Rai
nikesh_rai
 
Posts: 205
Joined: Tue Oct 18, 2011 1:27 am
Has thanked: 17 times
Been thanked: 0 time

Re: How calculate expected space for VB/V file

Postby prino » Sun Nov 12, 2017 1:19 am

And what is it that you do not understand? This is so elementary that it should put grave doubts as to your suitability of working in the field you are working in!

How the flipping 'ell would you calculate the space for an FB file with an average length of x bytes???

SIASD!
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: How calculate expected space for VB/V file

Postby nikesh_rai » Sun Nov 12, 2017 1:34 am

I am using this formula till now for FB files

391,227 records of FB LRECL=90

INTEGER(27998/90) = 311. Therefor 622 records will fit one track.
391227 / 622 = 628.9823 = 629 tracks required.
629 / 15 = 41.93333 = 42 cylinders required to store your data.

but not sure if anything extra is needed for variable length file

for my case.. my file length is 25000 byte but the program will write at max 10000 byte, I am expecting average file length to be around 6000 byte
Thanks
Nikesh Rai
nikesh_rai
 
Posts: 205
Joined: Tue Oct 18, 2011 1:27 am
Has thanked: 17 times
Been thanked: 0 time

Re: How calculate expected space for VB/V file

Postby Robert Sample » Sun Nov 12, 2017 4:52 am

You can easily find the maximum space required -- add 4 to the record length (for the RDW) and follow EXACTLY the same calculations as for a fixed length data set (the only files in z/OS are on tape or in Unix System Services). If you want to calculate the expected space, add 4 to the average record length and follow EXACTLY the same calculations as for a fixed length data set.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: How calculate expected space for VB/V file

Postby nikesh_rai » Sun Nov 12, 2017 3:59 pm

Thank you Robert. :)

I have one more doubt. While calculating required space. which length I should consider, 1) approx average length of records i.e. around 6000 bytes or 2) Length of longest record which will have 10000 bytes.

I google it but still doubtful on this because of mixed answers.
Thanks
Nikesh Rai
nikesh_rai
 
Posts: 205
Joined: Tue Oct 18, 2011 1:27 am
Has thanked: 17 times
Been thanked: 0 time

Re: How calculate expected space for VB/V file

Postby enrico-sorichetti » Sun Nov 12, 2017 7:47 pm

You did not pay attention :evil:
If you want to calculate the expected space, add 4 to the average record length and follow EXACTLY the same calculations as for a fixed length data set.
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: How calculate expected space for VB/V file

Postby nikesh_rai » Sun Nov 12, 2017 10:39 pm

Yes I did.. but was bit confused with answers on google. so wanted to confirm.. :)
Thanks
Nikesh Rai
nikesh_rai
 
Posts: 205
Joined: Tue Oct 18, 2011 1:27 am
Has thanked: 17 times
Been thanked: 0 time

Re: How calculate expected space for VB/V file

Postby enrico-sorichetti » Sun Nov 12, 2017 10:51 pm

so wanted to confirm..

confirm what ???
if You do not trust our replies You have no business hanging around here :evil:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: How calculate expected space for VB/V file

Postby Robert Sample » Mon Nov 13, 2017 4:14 am

If you would rather believe some unknown source from Google over us, WHY DID YOU ASK THE QUESTION IN THE FIRST PLACE?

Since I have over three thousand posts on this forum, why would you think I would lie to you?
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: How calculate expected space for VB/V file

Postby steve-myers » Mon Nov 13, 2017 7:48 pm

nikesh_rai wrote:Thank you Robert. :)

I have one more doubt. While calculating required space. which length I should consider, 1) approx average length of records i.e. around 6000 bytes or 2) Length of longest record which will have 10000 bytes.

I google it but still doubtful on this because of mixed answers.

Actually, it's more complex than Prino and others assume.

Knowing the longest record - e.g., the LRECL of the data set, is just about useless.

The fallacy of using the average record length is it is all to easy to figure all the records are the average length. Oops. You have 2 records, one is 10000, and the other is 2000, the average is your 6000, but the physical make up of the data set will not be what you expect.

With variable length records it is critically important to know the BLKSIZE. With BLKSIZE = 10000 and an average record length of 6000 bytes, it is all too likely you'll have blocks with one 6000 byte record. This is not so bad on tape, but it could be critical on disk.

One way to avoid space calculation problems is to use spanned records. Then the BLKSIZE, relative to the record size is less of a factor. The problem with RECFM=VBS is people tend to be afraid of it, especially Assembler programs using BSAM. Then there is the additional CPU cost to assemble the segments. Finally there are other issues with VBS. For example, you can't use DISP=MOD in situations where DISP=MOD would be natural in simple.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Next

Return to VSAM/SMS

 


  • Related topics
    Replies
    Views
    Last post