Bill Fairchild wrote:
The block length is indicated by the data length within the count field. A DASD block is written on the track with a Write Count, Key and Data or Write Count, Key, and Data Next Track command. The length of a count field is always 8. If you are to write a block length of zero onto a track, you put the block length into an 8-byte area in which you are building the count field and you set the CCW's byte count to 8, for the number of bytes to be transferred to the controller and written onto the track as a count field. When your software tries to read this block back later, the controller sees the data length of zero and signals unit exception along with the other ending status, then the access method interprets unit exception as end of file and invokes your EOF routine if you have one.
Correct, but slightly (?) misleading. The CCW byte count alone won't do it, unless the count record also has a key length and data length of zero set (interesting I/O errors result otherwise). To complicate matters, it is valid and occasionally desirable to have a write length other than 8, by writing a key + zero data length. It's one way of stopping a search CCW on a later I/O.
Gerhard Postpischil Bradford, VT ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

