On Sat, 28 Nov 2015 17:40:09 -0500, Shmuel Metz wrote:
>
>on 11/28/2015  at 02:50 PM, Scott Ford said:
>
>>Our STC use several files and I want to verify that the files have
>>the correct logical record length. The STCs are written LE Cobol. I
>>would like to know before I open the file if the file that is created
>>or allocated is correct in record length. For example, if the Logical
>>Record Length is 121 as defined in the program tries to open a file
>>with a LRECL 300 bytes. Can i do the following ?
>
Long ago I dealt with this problem in Assembler.  I left LRECL=0 in the
DCB.  It would be merged in from either the DSCB or JCL, JCL dominating.
I took the DCB OPEN exit.  If the value was still 0, unavailable from either
of those sources, I supplied a default LRECL; likewise for BLKSIZE and
RECFM.  Nowadays, SDB gets control last and supplies its default.   I
don't know how much of this is supported by COBOL except that coding
BLOCK CONTAINS 0 RECORDS allows SDB to operate.  Omitting the BLOCK
CONTAINS clause is equivalent to coding BLOCK CONTAINS 1 RECORD(S).
A supremely stupid default except, perhaps, in that it supports unit record
devices.

>3. If it's a concatenation, test whether LRECL and RECFM are the same
>in every dataset. See ARL, probably in the RDJFCB documentation.
> 
I believe that in days of yore the LRECL merged into the DCB by OPEN
if coded as 0 in the DCB and omitted in JCL was the LRECL from the
DSCB of the first catenand.  Stupid design.  I believe IBM actually fixed
something, and nowadays it's the maximum LRECL among the DSCBs
in the concatenation.

If RECFM=V* you may reasonably override to a larger value of LRECL;
if RECFM=F* it's inadvisable to try to change LRECL.

-- gil

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

Reply via email to