Re: Duplicate input files




ballantine@xxxxxxxxxxxx wrote:
Sorry, I meant the I-O CONTROL paragraph. Here is an example:

FILE-CONTROL.

SELECT INP1-FILE ASSIGN TO LQIN1FIL.
SELECT INP2-FILE ASSIGN TO LQIN2FIL.
SELECT OUT0-FILE ASSIGN TO LQOUTFIL.

I-O-CONTROL.

SAME RECORD AREA FOR INP1-FILE, INP2-FILE.

I tried this & it works fine. The same file was used for both LQIN1FIL
& LQIN2FIL.


ballantine@xxxxxxxxxxxx wrote:
" I suspect a program logic error but I wondered if Cobol
had a dislike of two sets of file handling routines pointing to the
same file..."


Try using the SAME RECORD AREA clause in the file-control paragraph.

I think this won't work. At a guess, my colleague seems to want to
match one input file against its' duplicate (God knows why), so
separate record areas needed on input files.

.



Relevant Pages

  • Re: Cobol problem
    ... is it another COBOL program that creates your input file - or is ... >> longest record area and any 'depending on' set to maximum value. ... FD InFile. ... >> 1) If you INITIALIZE before each READ then do so using ...
    (comp.lang.cobol)
  • Re: Cobol problem
    ... > contain the prev record data from the input file which is ... When a variable record area is initialized it should be done with the ... If you INITIALIZE before each READ then do so using ... if a 'B' record Arrives then WRITE OutB where these ...
    (comp.lang.cobol)
  • Re: Duplicate input files
    ... I meant the I-O CONTROL paragraph. ... SAME RECORD AREA FOR INP1-FILE, INP2-FILE. ... Try using the SAME RECORD AREA clause in the file-control paragraph. ...
    (comp.lang.cobol)