On Thu, 25 Dec 2014 22:29:07 +0000, Blaicher, Christopher Y. wrote:
>
>BSAM gets the length of the block to write from the DCB BLKSIZE at the time of 
>the WRITE.  As long as the DCB BLKSIZE is equal to or less than the max 
>BLKSIZE all is OK.  BSAM will build the CCHHRKDD from the various values it 
>keeps and the DD comes from the BLKSIZE.  I guess you could always leave the 
>BLKSIZE in the DCB, but you are supposed to set the BLKSIZE to the BDW size.
>
>I have not done much with BSAM in years, mostly EXCP and STARTIO, so 
>myknowledge of what BSAM checks and validates is vague at best.  IIRC, for 
>RECFM=V(B)(S) I never modified DCBBLKSI.
> 
I, likewise, and my Assembler skill has atrophied in the decades.

>For RECFM=FB, a short block is fine as long as it is a multiple of LRECL.  As 
>for finding end of file, it is recognized by the EOF marker or end of the last 
>extent, if blocks so fill a track that the system can't fit an EOF marker on 
>it.
> 
I remember that to write a short FB block I modified DCBBLKSI, and if I
neglected to restore the earlier value before CLOSE Bad Things happened.
IIRC, for RECFM=V(B)(S) I never modified DCBBLKSI.

>Now for Mr. Altmark's comment.  Yes, using BSAM, MVS can write all RECFM=VB 
>blocks BLKSIZE in length, but I would not guarantee that everybody will accept 
>them as valid.  Also, you would be wasting a lot of space on tracks if you do 
>that.
>
>Bottom line - Write well-formed blocks and follow the rules as outlined in the 
>various DFSMS manuals.
> 
I'd welcome a specific citation.


>On 2014-12-22, at 10:13, Alan Altmark wrote:
>> ...
>> MVS has no problem with short records in a block for VB[S] files.
>> Padding the last record doesn't hurt because MVS writes ECKD records
>> that are BLKSIZE in length, but you must not modify the RDW to include
>> the pad bytes.
>>
Or, for RECFM=V(B)S you may use Null Segments for padding.

Two respectable experts disagree.  I remember that for RECFM=V(B)(S) I
merely put the desired length in the BDW.  I don't yet know which:

o Does BSAM write BDW bytes?

o Does BSAM always WRITE DCBBLKSI bytes and QSAM ignore
  the excess on GET?  My experience (above) seems to support
  this.

o Does Postel's Principle pertain?

Certainly for RECFM=V, always writing BLKSIZE bytes would be wasteful
for a ragged file (a preponderance of short records).

It's a pity that QSAM doesn't routinely exploit track balances.

-- gil

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

Reply via email to