COBCH1658 VALUE OF FILE-ID overriding ASSIGN

A VALUE OF FILE-ID clause in the File Description entry is overriding the external-file-reference already specified in an ASSIGN clause in the File Control entry.

The external-file-reference should be specified only once to avoid ambiguity. One of the two specifications should be removed from the source program. When specified in both places, the VALUE OF FILE-ID specification will be used for the file and the ASSIGN clause specification of the external-file-reference will be ignored.

input-output section.
file-control.
select f1 assign to disk f1-name-1.       *> the first external-file-reference 'f1-name-1'
...
file section.
fd f1   record contains 10 characters
           value of file-id is f1-name-2. *> the second external-file-reference 'f1-name-2'
...