You must tell the run-time system which data source to use for your ODBC file. You accomplish this by setting the configuration variable A_ODBC_DATASOURCE to the exact name that you set up in the Windows ODBC driver manager. You can set this variable in your COBOL configuration file if using only one data source.
For example, if the data source you want to select is listed in the control panel ODBC window as:
MS Access Databases (Access Data (*.mdb))
you should add the following line to your configuration file:
A_ODBC_DATASOURCE MS Access Databases
If you used the Add option to configure a new data source driver, set A_ODBC_DATASOURCE to the personalized name that you entered in the Add window.
If you do not know the data source name in advance, or if you intend to use more than one data source, you may set the data source name dynamically at run time. In your COBOL program, you would add code similar to this prior to the statement that opens the file:
SET ENVIRONMENT "A_ODBC_DATASOURCE" TO "MS Access Databases"
You are now ready to use the sql.acu program, as outlined in the Getting Started section.
After you learn about and use this utility, you next find out about preparing and compiling your COBOL program, followed by learning to use the demonstration program.