Problem trying to open files

I'm using a Visual COBOL trial licence to migrate one program developed using a very old COBOL version to a newer one, and im facing a problem related to file handling.

The program needs to open a physical file twice at the same time, using INPUT and I-O modes. Below is one part of the code:

(...)
FILE SECTION.
FD ARQDK7 RECORD CONTAINS 1461 CHARACTERS
VALUE OF FILE-ID IS NOMSOR-DK7
DATA RECORD IS REG-DK7.
01 REG-DK7.
05 CHAVE-DK7 PIC X(16).
(...)

FD ARQDK7-CP RECORD CONTAINS 1461 CHARACTERS
VALUE OF FILE-ID IS NOMSOR-DK7-CP
DATA RECORD IS REG-DK7-CP.
01 REG-DK7-CP.
05 CHAVE-DK7-CP PIC X(16).
(...)

PROCEDURE DIVISION

MOVE "name_of_file" TO NOMSOR-DK7.
MOVE "name_of_file" TO NOMSOR-DK7-CP.

OPEN I-O ARQDK7.
OPEN INPUT ARQDK7-CP.
(...)

The I-O mode handles all the data process.
The INPUT mode is used only for verification while the program runs.

Thanks in advance.

Parents Reply Children
No Data