On Tue, 16 Sep 2014 13:29:57 -0700, Charles Mills wrote:

>Yup. Over-engineering. Over-validation. Like examining a filename to see if it 
>is syntactically valid rather than just passing it to the OS's open function 
>and seeing if it works for the OS.
> 
With the annoying consequence that if someone contrives to create an invalid
filename, perhaps by zapping the DSCB, it's unduly difficult to delete or 
rename it.

(But it might be prudent to suspect that if the object has an invalid name the 
DSCB
might be invalid otherwise, and great further harm might occur if it were 
blindly
deleted.)

In any OS other than z/OS (MVS?  OS/360?  Whatever.) your criticism (with which
I concur) would be fully valid.  z/OS JCL, however, burdens itself with 
performing
syntactic validation at Conversion time to reduce as far as possible the risk of
errors detected at run time.  But APIs to DYNALLOC shouldn't perform such
validation; they should simply reflect (and not transform) the status returned
by DYNALLOC.

But, for the OP's quandary, I was tempted to create non-empty data set
containing no data: one block, 4 bytes long, '00040000'x, and read it
overriding to RECFM=VB,LRECL=137,BLKSIZE=999.  I get "IEC036I 002-04",
for which M&C tells me:

 04
    One of the following occurred:

        An incorrect record was encountered during a QSAM GET operation. The 
data set consists of variable format records. The length field in the record 
descriptor word (RDW) is incorrect for one of the following reasons:

            The RDW specifies a length less than 4.

            The RDW specifies a length greater than the DCBLRECL value that was 
specified when the data set was opened. DCBLRECL is the logical record length 
(LRECL) in the data control block (DCB).

        QSAM tried to read segments of variable spanned records that are not in 
proper sequence.

        LRECL is not large enough.

        The record area in QSAM locate mode is too small to contain a logical 
record from a spanned-format data set.

        The BDW contained a length greater than the blocksize specified in the 
data control block (DCB).

None of those apply.  Perhaps QSAM tests at the bottom of the deblocking
loop rather than at the top, and used uninitialized storage as RDW.

Perhaps I'll submit an RCF.

-- gil

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

Reply via email to