From: Anonymous on
In article <1166727602.664630.95240(a)48g2000cwx.googlegroups.com>,
<manubay(a)pacbell.net> wrote:
>I think I didn't explain my problem well. Maybe it'll be better with
>an example. Let's say, I have file called TESTA. TESTA doesn't always
>have the same LRECL. Sometime TESTA will be defined in the JCL with
>LRECL=30. Other times, it will be have LRECL=70. And so on. My
>problem is how should TESTA be represented in FD?

That depends on the DCB for TESTA.

DD
From: William M. Klein on
Are you saying that the input file isn't always the SAME input file? Does it
always have the same fields in it?

What are the characteristics of the file?

COBOL does NOT handle well cases where the input may be one file today and
another (differently defined) file tomorrow. It does handle well cases where
the same RECFM=V is used and different length records appear in the file.

--
Bill Klein
wmklein <at> ix.netcom.com
<manubay(a)pacbell.net> wrote in message
news:1166727602.664630.95240(a)48g2000cwx.googlegroups.com...
>I think I didn't explain my problem well. Maybe it'll be better with
> an example. Let's say, I have file called TESTA. TESTA doesn't always
> have the same LRECL. Sometime TESTA will be defined in the JCL with
> LRECL=30. Other times, it will be have LRECL=70. And so on. My
> problem is how should TESTA be represented in FD?
>
> Regards,
> Greg
>
> docdwarf(a)panix.com wrote:
>> In article <1166725014.449314.160860(a)i12g2000cwa.googlegroups.com>,
>> <manubay(a)pacbell.net> wrote:
>> >Will it work on MVS COB 370 compiler?
>>
>> I've had no troubles in that environment.
>>
>> >How should i define the PIC
>> >clause?
>>
>> That depends on the file.
>>
>> >Unfortunately, I don't have a manual.
>>
>> This might help:
>>
>> <http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/FRAMESET/IGY3LR10/CCONTENTS?DT=20020920180651>
>>
>> >Thanks again.
>>
>> You're quite welcome.
>>
>> DD
>


From: P. Raulerson on
Wow -that's a slightly different animal than what I took you to originally
mean. Each run is essentially brand new file, huh?

The simple answer is to define the dataset as variable with the largest
possible record size set as the Max, then just use standard variable records
in COBOL.

That's a non-trivial challenge.

-Paul

<manubay(a)pacbell.net> wrote in message
news:1166727602.664630.95240(a)48g2000cwx.googlegroups.com...
>I think I didn't explain my problem well. Maybe it'll be better with
> an example. Let's say, I have file called TESTA. TESTA doesn't always
> have the same LRECL. Sometime TESTA will be defined in the JCL with
> LRECL=30. Other times, it will be have LRECL=70. And so on. My
> problem is how should TESTA be represented in FD?
>
> Regards,
> Greg
>
> docdwarf(a)panix.com wrote:
>> In article <1166725014.449314.160860(a)i12g2000cwa.googlegroups.com>,
>> <manubay(a)pacbell.net> wrote:
>> >Will it work on MVS COB 370 compiler?
>>
>> I've had no troubles in that environment.
>>
>> >How should i define the PIC
>> >clause?
>>
>> That depends on the file.
>>
>> >Unfortunately, I don't have a manual.
>>
>> This might help:
>>
>> <http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/FRAMESET/IGY3LR10/CCONTENTS?DT=20020920180651>
>>
>> >Thanks again.
>>
>> You're quite welcome.
>>
>> DD
>


From: Alex Flinsch on
On Thu, 21 Dec 2006 18:58:39 -0600, P. Raulerson wrote:

> Wow -that's a slightly different animal than what I took you to originally
> mean. Each run is essentially brand new file, huh?
>
> The simple answer is to define the dataset as variable with the largest
> possible record size set as the Max, then just use standard variable records
> in COBOL.
>
> That's a non-trivial challenge.
>
>

2 ways to go about it I can think of before more coffee --

The first is to set the record size in the program to the maximum, and the
record type to fixed. Then have a conversion step before executing the
program which uses a utility to convert the file to the lrecl used in the
program

The other is to set the record size in the program to the maximum and use
a record type of undefined.


From: Alistair on

Alex Flinsch wrote:
> On Thu, 21 Dec 2006 18:58:39 -0600, P. Raulerson wrote:
>
> > Wow -that's a slightly different animal than what I took you to originally
> > mean. Each run is essentially brand new file, huh?
> >
> > The simple answer is to define the dataset as variable with the largest
> > possible record size set as the Max, then just use standard variable records
> > in COBOL.
> >
> > That's a non-trivial challenge.
> >
> >
>
> 2 ways to go about it I can think of before more coffee --
>
> The first is to set the record size in the program to the maximum, and the
> record type to fixed. Then have a conversion step before executing the
> program which uses a utility to convert the file to the lrecl used in the
> program
>
> The other is to set the record size in the program to the maximum and use
> a record type of undefined.


ALTERNATIVELY (and I like this one): set the FD to contain a record of
one character length fixed blocked and read repeatedly, building the
record in working storage.

I can't believe that no-one came up with that one before me.