Page 1 of 1

Record format VBS and it's usage.

Posted: Sat Aug 31, 2013 11:45 pm
by Chandan Roy
What is Record format VBS, I read about them but when do we use them?

Re: Record format VBS and it's usage.

Posted: Sun Sep 01, 2013 12:08 am
by Robert Sample
VBS means variable, blocked, spanned -- that is, the record lengths for each record can vary, the data set uses blocked records (usually half-track for disk and 32760 for tape), and the records are spanned. When z/OS writes a variable blocked data set, if the block does not have enough space to contain the record then the block is written and a new block started. However, with spanned records the block is filled with part of the record and written so the new block only contains the part of the record not stored in the first block. This is maintained in the record descriptor word (RDW) -- renamed segment descriptor word for spanned data sets -- where the first 2 bytes contain the record length as usual but the last 2 bytes will contain a X'00' to indicate the record starts and ends in the block, X'01' means the record begins but does not end in this block, X'02' means the record ends but does not begin in this block, and X'03' means the record neither starts nor ends in this block.

VBS records are used with system data -- SMF in particular. It is rare for an application programmer to have a need for VBS records -- in more than 36 years of mainframe programming, I have had only ONE application that needed spanned records. The LRECL of the data set was over 22000 and rather than potentially getting as few as one record per block, I used spanned records to leave no more than 4 bytes unused in each block.

Re: Record format VBS and it's usage.

Posted: Sun Sep 01, 2013 12:42 pm
by Chandan Roy
Thanks Robert.

That's a great explanation and to the point. Great, Thanks.