File System Initialization

By default, with the exception of the EXTFH interface, ACUCOBOL-GT initializes enabled file systems upon runtime startup, before the first COBOL program begins execution. Initialization of the EXTFH interface, by default, is deferred until the first file operation on the file system. This provides the best runtime performance.

If you want to force initialization of EXTFH at startup, or you want to defer initialization of another file system, you can do so by setting a variable in "filetbl.c" and relinking the runtime. "filetbl.c" holds the ACUCOBOL-GT file system table. Settings in "filetbl.c" determine which file systems are enabled and when each system is initialized. "filetbl.c" is located in the lib subdirectory of your ACUCOBOL-GT installation.

To specify file system initialization for a given file system:

  1. Open "filetbl.c" in a text editor.
  2. Locate the TABLE_ENTRY for the file system you want to control, and change the defer_init parameter to the desired value. A value of "0" causes the file system to be initialized at startup. A value of "1" causes file system initialization to be deferred. The defer_init flag is set to "0" by default for all file systems except EXTFH.

    For example, following is the TABLE_ENTRY for Vision:

    TABLE_ENTRY  file_table[] = {
    #if   USE_VISION
       {   &v5_dispatch,   "VISIO", 0 },
    #endif /* USE_VISION */

    The defer_init value is the value that follows "VISIO" on the third line.

  3. When you have made your changes, save and close the file and relink the runtime. See Relinking the Runtime System for more information.

If a deferred file system initialization fails, the file status is set to 9B (32 for IBM DOS/VS) to indicate that the requested operation is not supported.

Note: Starting the runtime with the "-v" option forces startup initialization of all enabled file systems, as well as output of version information. For a complete description of the "-v" option, see Standard Options.