File Handling Options

Some COBOL systems do not abort when a file error occurs and there is no Declarative to handle it. If you desire this behavior, set the runtime configuration entry ERRORS_OK to one of the non-zero values described in the entry for ERRORS_OK in Appendix H. Configuration Variables.

CAUTION:
When ERROR_OK is enabled, file errors that would normally cause ACUCOBOL-GT to abort will instead allow processing to continue. This means that when ERRORS_OK is enabled, you will not get the usual error reporting. Under most circumstances this is undesirable.

Some compilers also automatically create files when they are opened for I/O or EXTEND, if the files are missing. You can simulate this behavior by setting EXTEND_CREATES to 1 if you want to create files opened for EXTEND and setting IO_CREATES to 1 to create files opened for I/O.

RM/COBOL version 2 automatically closes all files except print files when a program executes an EXIT PROGRAM statement. By default, ACUCOBOL-GT does not do this, because it is a violation of the ANSI standard. If the configuration variable CLOSE_ON_EXIT is set to 1, then this behavior is emulated by runcbl. You can also set this variable to 2 to cause all files (including print files) to be closed when a program exits. Setting the variable to zero resets this option.

RM/COBOL version 2 also automatically causes a page eject when a print file is closed unless the WITH NO REWIND option is used on the CLOSE statement. The configuration variable PAGE_EJECT_ON_CLOSE can be set to 1 to cause this behavior. Setting it to 0 causes the normal behavior of not ejecting a page.

You can improve the performance of indexed files that are opened WITH LOCK by setting the configuration variable MASS_UPDATE to 1. This causes ACUCOBOL-GT to treat these files as if they were opened with the MASS-UPDATE phrase specified. See Mass Update for details on this phrase.