File I/O error handling

In most cases, HP COBOL and ACUCOBOL-GT handle file I/O errors in exactly the same way. Specifically, if the program includes a USE statement procedure, an INVALID KEY phrase, or an AT END phrase, and a file I/O error occurs, the appropriate code is executed. However, when a FILE STATUS variable is specified with a file, the behavior of the two COBOLs can differ. For example, when a FILE STATUS variable is specified and an OPEN INPUT statement attempts to open the file but the file does not exist, HP COBOL sets the FILE STATUS item and the program continues to execute. In contrast, ACUCOBOL-GT sets the FILE STATUS item and halts the program. ACUCOBOL-GT can be made to behave like HP COBOL by setting the ERRORS_OK configuration variable. When ERRORS_OK is set to a value of "1", file I/O errors are ignored. The result being that when ACUCOBOL-GT attempts to OPEN a file that doesn't exist, FILE STATUS is set and the program continues to execute. For complete information on the ERRORS_OK configuration variable, see ERRORS_OK.