On Sun, 29 Nov 2015 05:26:26 -0600, Elardus Engelbrecht wrote:
>
>>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.   
>
>Good approach, but I prefer to a$$ume that LRECL is fixed and known and then 
>let the system abend the job if an incorrect LRECL is used. But then it is 
>just me.
> 
I will take little credit/responsibility; I was a novice and had intense 
mentoring.

It was in a runtime library for a FOSS (almost; there were some amusing license
clauses) Pascal system.  Many HLLs have similar behaviors.  Rexx, for example
supplies default but not overriding values of RECFM and LRECL.  It used to
supply a default BLKSIZE but that was changed by APAR to allow SDB to
operate.  That actually broke some code (mine and others') because the oldest
SDB sometimes chose a BLKSIZE incompatible with explicitly coded LRECL.
That also was fixed by APAR, but IBM support recommended that I *always*
code BLKSIZE -- an ironic consequence of the introduction of SDB.

Many IBM utilities not only supply defaults but even override explicitly coded
values of DCB attributes, especially for SYSIN and SYSPRINT.  I once had a
RECFM=VB PDS corrupted when a user allocated an assembler SYSPRINT to
one of its members.  I changed it back, recovering most of the members and
leaving it broken for the offender.

>>If RECFM=V* you may reasonably override to a larger value of LRECL;
> 
(Unless a client QSAM program has a fixed buffer size coded.)

>Including VBS (spanned records) too?
>
I'd hesitate to change anything else to RECFM=32768 (LRECL=X).  Rexx lately
accommodates VBS but not 32768.

>
>>if RECFM=F* it's inadvisable to try to change LRECL.
>
>Yup. You get some nice abends for that change. Easy to fix all values to an 
>expected LRECL value, but it depends on what you as programmer expects.
> 
Particularly writing to a PDS or MOD to a PS.


>Note: DFSORT has some clever magic tricks to figure out the LRECL, RECFM, 
>DSORG of input data.... I wish I can see how that is done...
> 
Frequently, any submission to this forum that mentions DFSORT or ICETOOL
elicits a very expert followupl

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