To prepare your program and execute it using Database Connectors

  1. Use the following directive:

    CREATEXFD (parameter,...)

    By default, if no parameters are specified to the CREATEXFD directive, XFDs are created for indexed files. XFDs are portable across operating systems.

    • VERSION=n

      Creates XFDs as version n

    • XFD-DIRECTORY=pathname

      Creates XFDs in the directory specified by pathname


      Creates XFDs for indexed, relative, and sequential files

    For information about XFDs, see the chapter XFDs.
  2. Compile.

    You compile your COBOL application with your COBOL development system's Compiler.

  3. Set the files host.

    In an ACUFH configuration file, you may specify which RDBMS file system you are using by setting the DEFAULT_HOST variable (sets a default for all files), or the filename_HOST variable (sets a file system for individual files), or both. For example, you might say EMPFILE_HOST ORACLE. This would direct EMPFILE input and output functions to the Oracle RDBMS via Database Connectors™, and direct I/O for all other indexed files to the EXTFH file handler. These are run-time settings that allow you to change hosts without recompiling, and enable you to tailor your application for the specific needs of a particular end-user site.


    The filename_HOST variable also enables you to do load balancing and migration of your application. You can move indexed files into the database in an incremental fashion, allowing you to test scaling and performance of the new configuration.

  4. Set database-specific variables.

    At this point, you set variables in the ACUFH configuration file that apply to the specific database system you are using. See the appendix specific to your RDBMS for details.

  5. Pass I/O requests to the interface.

    You use the run-time system to execute your application. Whenever the run-time system encounters an input or output instruction (such as READ or WRITE) on a file that is directed to an RDBMS, it passes the request to Database Connectors.

  6. Automatically build SQL statements.

    Database Connectors automatically builds SQL instructions that your database management system can understand. As it builds these SQL instructions, it looks at the XFD, which maps the COBOL record and its fields to the table rows and its columns.

  7. Access a database.

    The database management system uses its own XFD as a pointer into its own data files, performs the requested I/O operation, and passes the results back to Database Connectors.

  8. Form COBOL records.

    Database Connectors translates the data fields into COBOL records or status codes, which are then passed back to the run-time system via the ACUFH file handler.

    All of this communication is automatic, and all database queries and translations are performed behind the scenes, so that the end user experiences no interruption in program execution.