


The Acu4GL product builds its own database queries dynamically whenever an input or output request is received. These are the steps that you take to compile your program and execute it using Acu4GL:
Compiling with -Fx
You compile your standard COBOL application with ACUCOBOL-GT. See the appendix specific to your RDBMS for details to determine which version of the compiler is required. When you compile, you specify via a compile-time option that you want the compiler to generate data dictionaries, in addition to an object code file.
Creating dictionaries
An ACUCOBOL-GT data dictionary is created by the compiler for each indexed file in your program. These data dictionaries map COBOL records in an indexed file to rows in a database. Like ACUCOBOL-GT object files, these data dictionaries are portable across platforms.
Setting the files host
In your configuration file, you may specify which RDBMS or ISAM 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 DEFAULT_HOST VISION and EMPFILE_HOST ORACLE. This would direct EMPFILE input and output functions to the Oracle RDBMS via Acu4GL, and direct I/O for all other indexed files to the Vision system. These are runtime settings that allow you to change hosts without recompilation, and enable you to tailor your application for the specific needs of a particular end user site.
At this point, you set variables in the runtime configuration file which apply to the specific database system you are using. See the appendix specific to your RDBMS for details.
Passing I/O requests to the interface
You use the Acu4GL enabled ACUCOBOL-GT runtime system to execute your application. Whenever the runtime 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 the Acu4GL product.
Automatically building SQL statements
Acu4GL automatically builds SQL instructions that your database management system can understand. As it builds these SQL instructions, it looks at the ACUCOBOL-GT data dictionary, which map the COBOL record and its fields to the table rows and its columns.
Accessing a database
The database management system uses its own dictionary as a pointer into its own data files, performs the requested I/O operation, and passes the results back to the Acu4GL product.
Forming COBOL records
Acu4GL translates the data fields into COBOL records or status codes, which are then passed back to the runtime system via the generic 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.