FOR1441S
The OPEN statement could not connect unit unit-number to file-name. The STATUS specifier had a value of SCRATCH, but the ACTION specifier had a value of READ

Explanation

The STATUS specifier had a value of SCRATCH, which implied that a temporary file was to be created and that output statements, such WRITE or ENDFILE, would be executed. However, the ACTION specifier had a value of READ, which implied that that no output statements would be executed.

System action

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

Ensure that the value of the STATUS specifier is consistent with the value of the ACTION specifier and with the capabilities of the file or device referenced by the file definition (DD statement or ALLOCATE command) or by the data set name given in the FILE specifier on the OPEN statement. You might have to change either the STATUS specifier, the ACTION specifier, the file definition, or the data set name.

If you just want to read from a file, then the value of READ for the ACTION specifier is correct. In this case, either remove the STATUS specifier or change its value to OLD. Ensure that the file really exists and that you can read from it.

If you want to create a temporary file and write records on it, then the value of SCRATCH for the STATUS specifier is correct. In this case, either remove the ACTION specifier or change its value to READWRITE. Also ensure that the file definition refers to a file or device on which you can write records. Note that when the STATUS specifier has a value of SCRATCH, you must omit the FILE specifier.

Symbolic Feedback Code

FOR1441