ContentsIndexPreviousNext

A_ODBC_ERROR_MAP_FILE

Because there are so many drivers available for ODBC, you may find that data source error codes don't necessarily map well to COBOL error codes. To solve this problem, Acu4GL for ODBC allows you to create an error map file to map native database errors to COBOL errors. Create the file using the guidelines described on the following page, and then use the configuration file variable, A_ODBC_ERROR_MAP_FILE, to indicate the name and location of the file you created.

Example

If the file used for mapping is called MAP and this file is located in the directory C:\ODBC, you would specify:

     A_ODBC_ERROR_MAP_FILE  c:\ODBC\MAP

in the runtime configuration file. There is no default value for this variable.

Guidelines for creating a map file

Although you can check your data source documentation for error code information, the easiest way to determine what error codes need to be mapped to more appropriate COBOL codes is through trial and error. As users use Acu4GL for ODBC, they may report receiving error messages that don't make sense based on their situation. Research these errors and try to determine a more appropriate COBOL error response.

When you create your error map file, use the following guidelines:

Through experience, Acucorp has discovered specific ways to better map errors for some drivers. For a list of these driver error mapping suggestions, look at the file "odbcerrs" on your installation disks.