At 13:25 -0400 on 10/06/2012, Gerhard Postpischil wrote about Re: Zero length records outlawed! (Again.):

Perhaps I'm missing something, but hex 00040000 defines a null
record in V, VB, and VBS. VBS runs fine without segment
descriptor bits.

Correct (if I remember correctly).

There are 4 types of records in a VBS block (which are identified by the segment descriptor bits). These are start of segment (the record continues in the next block), end of segment (this is the end of a record that started in a prior block), middle segment (this record started in a prior block and continues in the next block), and complete record (a standard VB record which is totally contained in the current block - it is signified by the lack of any segment bits like all records in a VB block).

Which type of segment is written to the current block is based on how much room remains in the current block. A complete record is written if there is 4 or more bytes more than the length of the record left (ie: 4 bytes for the RDW plus the payload). If there is not enough room then the remaining room is filled with a RDW plus as much of the record as will fit in the remaining room (a short block is written if there are not 5 bytes left in the block if the prior record is a complete record or end of segment - ie: The record starts in the next block). The next block is then started with the 4 byte BDW and 4 byte RDW with the rest of the block being filled in with as much of the record as will fit (a middle segment) or the rest of the record (an end of segment record). This "use as much as will fit" process continues until the record is totally written.

Note that when you are writing to DASD, the block size is restricted to however much room is left on the track so the last block on a track is shorter than the defined Blocksize.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to