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.