FOR1405S
The OPEN statement could not connect unit unit-number to file-name. The ACTION specifier, which had a value of WRITE, conflicted with the KEYS specifier, which listed more than one key. Fortran Version 2 Error Number: AFB121I

Explanation

A value of WRITE was provided for the ACTION specifier on an an OPEN statement that specified keyed access; this implied that records were to be loaded into the file using the file's primary key. However, the KEYS specifier listed more than one start-end pair, and this is not permitted when loading records into the file.

System action

If the unit is other than the error message unit, the unit is no longer connected to a file. If neither the ERR nor the IOSTAT specifier is present on the I/O statement, the condition is signaled. If the condition is unhandled, the application is terminated.

Qualifying Data: Only the basic set of four qualifying data for I/O conditions as shown in Table 1. Within this basic set, statement has a value of READ, and parm_count has a value of 4.

Permissible Resume Actions:

Name Action Taken after Resumption
RN The OPEN statement is not completed, and execution continues.

Programmer response

If you want to load records into the file with records that are presented in increasing sequence of the primary key, then either remove the KEYS specifier or specify only the start-end pair that represents the primary key for the file. Ensure that the file definition (DD statement or ALLOCATE command) refers to the base cluster of the VSAM key-sequenced data set rather than to a path that corresponds to one of the alternate index keys.

If you want to process a file that is not empty, change the value of the ACTION specifier to READ or READWRITE.

Symbolic Feedback Code

FOR1405