A_ODBC_DATASOURCE configuration variable

Set A_ODBC_DATASOURCE to the exact name of the data source that you established in the Windows or Linux/UNIX ODBC driver manager. You can set this variable in your COBOL configuration file if you will be using only one data source.

For example, if the data source you want to select is listed in the Windows ODBC driver manager window as MS Access Databases (Access Data (*.mdb)), add the following line to your configuration file:

A_ODBC_DATASOURCE MS Access Databases

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 "data source name"

There is no default value for this variable. If you do not enter a name, ODBC uses the default ODBC driver.