Is it acceptable practice to have a cobol program defined with 2 logical files pointed to the same physical file?
Here is a code snippet to show what I am doing. I'm reading the file sequentially and then doing a keyed lookup back into the file and then updating the record on the file being read sequentially.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT WDELVRY-FILE
ASSIGN TO SYS016-WDELVRY
ORGANIZATION IS INDEXED
ACCESS IS SEQUENTIAL
RECORD KEY IS WDELVRY-KEY
FILE STATUS IS WDELVRY-STATUS.
SELECT WDELVRY2-FILE
ASSIGN TO SYS017-WDELVRY
ORGANIZATION IS INDEXED
ACCESS IS DYNAMIC
RECORD KEY IS WDELVRY2-KEY
FILE STATUS IS WDELVRY2-STATUS.