7.93.2 OPEN Comments / Warnings

In addition, use of the *KEEPOPEN option against a file that is already open will cause the file to be flagged so that it can only be closed by a specific CLOSE command. The file is not actually closed and opened again (as with the *OPNQRYF option), but it is internally tagged so that it cannot be closed unless a specific CLOSE request command is issued.

There are 2 ways a file can be closed:

When an RDML program terminates normally it will attempt to automatically close all the database files it uses. However, if one or more of the following conditions apply the close request for a file will be ignored:

In addition, after using the *OPNQRYF option in combination with a specific KEYFLD parameter (other than the special *FILE parameter), it is advisable to only use a simple SELECT loop to read all records from the temporary access path created by the OPNQRYF command.

Attempting to use a SELECT command (or any other I/O command for that matter) that has a WITH_KEY parameter may produce unpredictable results because the file key being used by the I/O module does not match the actual key of the temporary file created by the OPNQRYF command.

Additionally, use of this option may cause a slight degradation over communication lines because it is not possible to use the DFRWRT (defer screen write until read) option in the associated IBM i display file.

Refer to the IBM i CRTDSPF command in the appropriate IBM supplied manual for more details of the DFRWRT parameter.

Attempting to manually change the display file to DFRWRT(*YES) will completely nullify the "overlap" feature and the user will have to wait until the file(s) are open before the first screen appears.