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



"William M. Klein" <wmklein@xxxxxxxxxxxxxxxxx> wrote in message
news:_vANj.25950$i_6.16089@xxxxxxxxxxxxxxxxxxxxxxxxx
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.

You know, after my little "VB" faux pas yesterday, I actually may be able
to help here.

I actually did this once - well, to be accurate, I solved the problem,
although not in the COBOL program - by cheating.

Before my COBOL program supporting "any" record length files ran, I either
IEBGENER'ed or IDCAMS'ed or SYNCH-SORTed (memory IS the second thing to go
you know) the input file to a temp file and read that in my COBOL program.
Whichever utility I used read the input and was agnostic re its LRECL and
BLKSIZE and FB or VB , and it made the output whatever it was I had
specified in the COBOL program's input.

I''m thinking I probably added some kind of 'record indicator' to the
output since I didn't need the entire 32000 (something like that) bytes I
had the utility create for actual file data.

Not that this would be terribly useful if this is supposed to be an
interactive program, but for a batch job w/JCL, it's one dinky little step
to insert.

If nothing else maybe this will give someone else some ideas. (eg doesn't
IDCAMS have a program API you can call from COBOL?)

--
Michael C. Mattias
Tal Systems Inc.
Racine WI
mmattias@xxxxxxxxxxxxxx


.