Re: COBOL 3.2 on z/OS reading variable len files



There is no TRULY supported way in IBM mainframe COBOL to create an FD for an VB
file that will work for "any" (non-specific) LRECL.

There used to be a way to get around this with RECORDING MODE U, but if you look
at:
http://publibfp.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/igy3mg40/3.5.3

you will see that "trick" no longer works.

The bottom-line is:
do NOT try and "lie" to your COBOL program about the LRECL of the files to be
opened, or FS=39 will be the result.

P.S. There ARE ways around this in COBOL on other environments and with other
vendors, but not IBM mainframe COBOL.

--
Bill Klein
wmklein <at> ix.netcom.com
"Luke Skywalker" <luke.skywalker@xxxxxxxxxxxx> wrote in message
news:01254c83$0$23724$c3e8da3@xxxxxxxxxxxxxxxxxxxx
Hi,
MYFILE is VB 1328 BLKSIZE 27998 but this is a sample...
I do not include RDW, I want to write a FD clause that can read any kind of VB
file; as the lrecl max in the system is 32760, I wrote 32756 (32760 -4).
My goal is to be able to read either

FILE1 VB 72 or FILE2 VB 256 or ...........or FILEN VB ???? without changing
neither the source code nor the JCL

Thanks for your help

"William M. Klein" <wmklein@xxxxxxxxxxxxxxxxx> a écrit dans le message de
groupe de discussion : fgtNj.459820$us.89707@xxxxxxxxxxxxxxxxxxxxxxxxx
What are the DCB attributes of the file? (Say via ISPF 3.2).

When you say 32756 are you including the RDW? If so, you shouldn't be.

P.S. You don't need
RECORDING <mode> V

When you code RECORD VARYING IN SIZE
you automatically get that.

--
Bill Klein
wmklein <at> ix.netcom.com
"Luke Skywalker" <luke.skywalker@xxxxxxxxxxxx> wrote in message
news:025c570a$0$6316$c3e8da3@xxxxxxxxxxxxxxxxxxxx
Hi,

I try to read any kind of VB file but I got FS 39 (lrecl mismatch)


FD MYFILE
RECORDING V BLOCK 0 RECORDS
RECORD IS VARYING FROM 1 TO 32756 DEPENDING ON WS-CPT.

01 MREC.
05 FILLER PIC X(01) OCCURS 1 TO 32756 DEPENDING ON WS-CPT.



(.....)



OPEN MYFILE => File STATUS 39


MYFILE is VB, LRECL 1328, but I do not want to focus on lrecl 1328, it could
be any other LRECL less or equal to 32756



Any ideas dears ?

Thanks a lot....






.



Relevant Pages

  • Re: COBOL 3.2 on z/OS reading variable len files
    ... MYFILE is VB 1328 BLKSIZE 27998 but this is a sample... ... When you say 32756 are you including the RDW? ... I try to read any kind of VB file but I got FS 39 (lrecl mismatch) ... RECORDING V BLOCK 0 RECORDS ...
    (comp.lang.cobol)
  • Re: COBOL 3.2 on z/OS reading variable len files
    ... I'm not able to write an assembler program, ... FD MYFILE ... RECORDING V BLOCK 0 RECORDS ... MYFILE is VB, LRECL 1328, but I do not want to focus on lrecl 1328, it could ...
    (comp.lang.cobol)
  • Closing this thread Re: COBOL 3.2 on z/OS reading variable len files
    ... groupe de discussion: 025c570a$0$6316$c3e8da3@xxxxxxxxxxxxxxxxxxxx ... I try to read any kind of VB file but I got FS 39 (lrecl mismatch) ... FD MYFILE ... RECORDING V BLOCK 0 RECORDS ...
    (comp.lang.cobol)
  • COBOL 3.2 on z/OS reading variable len files
    ... I try to read any kind of VB file but I got FS 39 (lrecl mismatch) ... FD MYFILE ... RECORDING V BLOCK 0 RECORDS ... RECORD IS VARYING FROM 1 TO 32756 DEPENDING ON WS-CPT. ...
    (comp.lang.cobol)
  • Re: COBOL 3.2 on z/OS reading variable len files
    ... When you code RECORD VARYING IN SIZE ... RECORDING V BLOCK 0 RECORDS ... OPEN MYFILE => File STATUS 39 ... MYFILE is VB, LRECL 1328, but I do not want to focus on lrecl 1328, it could ...
    (comp.lang.cobol)