On Fri, 18 Jul 2014 12:54:51 -0400, Thomas David Rivers wrote:
>
>After Terry posted some sample code that indicated the DCBBLKSI
>*was* set after an OPEN (and a collected "phew" from me) - I started
>digging into it more.
> 
Sigh of relief.

>It looks like this was, in fact, a bug in the OPEN EXIT - it was
>incorrectly overwriting
>the DCBBLKSI field.   That's been corrected and the code is happilly
>allocating
>a buffer of the maximum block size for the file (happy little code... I
>just love anthropomorphized bits.)
> 
IBM designers a half century ago are not to be forgiven for the continuing
anguish they inflicted on programmers in order to save two bytes in the
DCB.  There should have been two separate fields, one for the label
block size; the other for the size of the block currently being processed.

For example, I learned, painfully, that to write a short block with BSAM
at the end of a RECFM=FB data set, I need to set DCBBLKSI to the
length of that block.  I did, and my data set was unreadable.  I was
astonished and dismayed to learn that value was copied to the DSCB
on CLOSE.  I needed to save and restore it, wasting far more storage
than a distinct halfword in the DCB would have spent.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to