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.

Bill Fairchild

Software Developer 
Rocket Software
275 Grove Street * Newton, MA 02466-2272 * USA
Tel: +1.617.614.4503 * Mobile: +1.508.341.1715
Email: [email protected] 
Web: www.rocketsoftware.com


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of 
Paul Gilmartin
Sent: Monday, August 10, 2009 4:18 PM
To: [email protected]
Subject: Re: Concatenations and blocksizes

On Mon, 10 Aug 2009 16:55:31 -0400, Bill Fairchild wrote:

>You have always been able to write a block of only one byte, or even zero 
>bytes, onto a DASD.
>
I thought a count of zero was prohibited in a CCW.  (But
there may be other ways.)

As for the minimum of 18 for tape, how does the access
method deal with a program that does RECFM=VB; OPEN
PUT RDW has count of 4; CLOSE; which would generate
an 8-byte block.  This might easily happen inadvertently
if a preceding block was filled and the 8-byte (or up
to 17-byte) block was the last block written before
CLOSE.  If RECFM=VBS, the access method _could_
pad with a null segment, but I don't know that null
segments are allowed for non-Spanned RECFM.

-- gil

----------------------------------------------------------------------
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

----------------------------------------------------------------------
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

Reply via email to