Re: AW: Re: OPEN not filling in DCBBLKSI for RECFM=U data set

2014-07-17 Thread Paul Gilmartin
On Fri, 18 Jul 2014 07:40:46 +0200, Peter Hunkeler wrote:

>RECFM=U stands for undefined. As someone else already pointed out, every block 
>can be of different length, no matter what block size is set. The block size 
>field in the DCB is used to communicate the current block's length between the 
>program and the access method. I can imagine this to be the reason it is not 
>set by OPEN. However, the JFCB should have the value from the DD or VTOC 
>(DSCB). You could try reading the JFCB.
> 
I agree with Dave here.  That value in the DSCB, tape label, or DD statement
indicates the maximum block size supported by the data set.  That value should
be merged into the DCB by open in order that the program can allocate buffers
of suitable size.  Subsequently, the size of each block as read could be 
returned
in DCBBLKSI (but ISTR, perhaps for RECFM=FB, finding that specific block size
by subtracting the RBC in the IOB from the global BLKSIZE.)

But I'd really like a clarification in the form of a citation of an unambiguous
passage in a reference manual.  JFCB would do, but without the "should".

-- gil

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


Re: AW: Re: OPEN not filling in DCBBLKSI for RECFM=U data set

2014-07-18 Thread Bill Godfrey
On Fri, 18 Jul 2014 07:40:46 +0200, Peter Hunkeler wrote:

>RECFM=U stands for undefined. As someone else already pointed out, every block 
>can be of different length, no matter what block size is set. The block size 
>field in the DCB is used to communicate the current block's length between the 
>program and the access method. I can imagine this to be the reason it is not 
>set by OPEN.

You are thinking of the DCBLRECL field, not the block size field, and only for 
QSAM GET.

See http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2D580/2.2.29

Where it says:
"If you are reading undefined-length records (RECFM=U) and you are not using 
the large block interface (LBI), the system places the length of the record or 
segment in the logical record length (DCBLRECL) field of the data control 
block."

The block size field is not set to the current block's length for BSAM READ 
either. For BSAM READ, the length is determined after a CHECK or WAIT by 
subtracting the residual count from the length used by READ, as described in 
Using Data Sets:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2D4A0/3.6.7
Subtract this residual count from the number of data bytes requested to be read 
by the READ macro.

I have always found the block size field set by OPEN for existing data sets 
that have a block size in the VTOC/

Bill

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


Re: AW: Re: OPEN not filling in DCBBLKSI for RECFM=U data set

2014-07-18 Thread David Andrews
On Fri, 2014-07-18 at 07:38 -0500, Bill Godfrey wrote:
> The block size field is not set to the current block's length for BSAM
> READ either. For BSAM READ, the length is determined after a CHECK or
> WAIT by subtracting the residual count from the length used by READ,
> as described in Using Data Sets:
> 
> http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2D4A0/3.6.7
> Subtract this residual count from the number of data bytes requested to be 
> read by the READ macro.

Huh.  Have I been doing this wrong?  I've got some *old* (DSORG=PO) code
that, after READ/CHECK, follows DECB->IOB and uses the residual count at
IOBCSW+5.

(Not my invention.  I'm sure I lifted that code from someone else,
probably Dave Phillips, back in the day.)

-- 
David Andrews
A. Duda & Sons, Inc.
david.andr...@duda.com

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


Re: AW: Re: OPEN not filling in DCBBLKSI for RECFM=U data set

2014-07-18 Thread Paul Gilmartin
On Fri, 18 Jul 2014 13:27:59 +0200, Peter Hunkeler wrote:

>> Remember the merge order for OPEN is program, DD Statement, and DSCB.
>
>If memory serves me right, the JFCB is built by allocation long before OPEN. 
>It contains a) the dcb parms from the DD (or SVC 99), and b) data from the 
>DSCB for all fields not specified on the DD. b) happens only for existing data 
>sets, of course.
> 
When is the JFCB populated for an SL tape with the DEFER option, but attributes
not specified in JCL or SVC 99?

-- gil

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


Re: AW: Re: OPEN not filling in DCBBLKSI for RECFM=U data set

2014-07-18 Thread Bill Godfrey
On Fri, 18 Jul 2014 09:21:15 -0400, David Andrews wrote:

>On Fri, 2014-07-18 at 07:38 -0500, Bill Godfrey wrote:
>> The block size field is not set to the current block's length for BSAM
>> READ either. For BSAM READ, the length is determined after a CHECK or
>> WAIT by subtracting the residual count from the length used by READ,
>> as described in Using Data Sets:
>>
>> http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2D4A0/3.6.7
>> Subtract this residual count from the number of data bytes requested to be 
>> read by the READ macro.
>
>Huh.  Have I been doing this wrong?  I've got some *old* (DSORG=PO) code
>that, after READ/CHECK, follows DECB->IOB and uses the residual count at
>IOBCSW+5.
>

There is no conflict. The manual page, at the link I provided, says "The 
residual count is in the halfword, 14 bytes from the start of the status area". 
IOBCSW is 9 bytes into the status area. IOBCSW+5 is therefore 14 bytes into the 
status area.

Bill

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


Re: AW: Re: OPEN not filling in DCBBLKSI for RECFM=U data set

2014-07-18 Thread Shmuel Metz (Seymour J.)
In <0741344928727709.wa.paulgboulderaim@listserv.ua.edu>, on
07/18/2014
   at 01:09 AM, Paul Gilmartin
<000433f07816-dmarc-requ...@listserv.ua.edu> said:

>Subsequently, the size of each block as read could be returned in
>DCBBLKSI 

No. DCBLRECL.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see  
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

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


Re: AW: Re: OPEN not filling in DCBBLKSI for RECFM=U data set

2014-07-18 Thread Shmuel Metz (Seymour J.)
In , on 07/18/2014
   at 07:40 AM, Peter Hunkeler  said:

>RECFM=U stands for undefined. As someone else already pointed out,
>every block can be of different length, no matter what block size 
>is set. The block size field in the DCB is used to communicate the
>current block's length between the program and the access method.

No.

   5.  Undefined-length records when not using LBI: The actual
   length of the record that was read is returned in the
   DCBLRECL field of the DCB. Because of this use of DCBLRECL,
   you should omit LRECL. Use this method only with BSAM, or
   BPAM or after issuing a QSAM GET macro.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see  
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

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


Re: AW: Re: OPEN not filling in DCBBLKSI for RECFM=U data set

2014-07-18 Thread Shmuel Metz (Seymour J.)
In , on 07/18/2014
   at 01:27 PM, Peter Hunkeler  said:

>If memory serves me right, the JFCB is built by allocation long
>before OPEN. It contains a) the dcb parms from the DD (or SVC 99),
>and b) data from the DSCB for all fields not specified on the DD.

No; allocation does not merge DSCB fields into the JFCB; that's done
by OPEN.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see  
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

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


AW: Re: AW: Re: OPEN not filling in DCBBLKSI for RECFM=U data set

2014-07-18 Thread Peter Hunkeler
> You are thinking of the DCBLRECL field, not the block size field, and only 
> for QSAM GET.


I stand corrected. You're absolutely right.


--
Peter Hunkeler


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