dividby0 wrote:
> Hi,
>
> I'm writing a COBOL program which accepts 5 KSDS files and extract
> data into a single file. All the files are of the same type and have
> same data fields with values from different sources.
>
> I am able to do this for 1 input file. But I'm having problems with
> the Record Key Clause and FD for 5 files.
>
> Since the files have same struction I'm using"
>
> RECORD KEY IS NCB-D100
>
> How can I do this for 5 files?
>
> And, I'm using a copybook for the FD:
>
> FD INP-FIL.
> COPY BCBSECR.
>
> I want to use the same copybook for all the 5 files.
>
> Help required.
>
In the assign clause, assign the file to a data name instead of a
literal. Then set the first file name, open it, and read it. When
done, close the file, change the name to the next, and repeat. etc.
Donald


|