Product Documentation

FairCom RTG COBOL Edition User's Guide

Previous Topic

Next Topic

Enabling XDDOPEN, XDDCHECK, and XDDCLOSE for Programmatic SQL Conversion Error Checking

The XDDOPEN, XDDCHECK, and XDDCLOSE commands make it possible to programmatically check if there will be any conversion errors accessing a table from SQL (see API for SQL Conversion Error Checking for details). This allows them to be called directly from ACUCOBOL without the necessity to load the mtclient.dll.

To allow these commands to be called from ACUCOBOL, the following modifications are necessary:

  1. Edit the ACUCOBOL-GT file system configuration file direct.c located in the ACUCOBOL-GT lib directory, for example: /usr/acucbl810/acugt/lib.
  2. Search for the struct DIRECTTABLE LIBDIRECT[] array.
  3. Just before the array found in step 1, add these three lines:

    extern void* ct_XDDOpen();

    extern long ct_XDDCheck();

    extern void ct_XDDClose();

  4. Within the array elements add the following:

    { "XDDOPEN", FUNC ct_XDDOpen, C_pointer},

    { "XDDCHECK", FUNC ct_XDDCheck, C_long},

    { "XDDCLOSE", FUNC ct_XDDClose, C_void},

  5. Make sure the following line (which is already part of the array) is the last one:

    { NULL, NULL, 0 }

After performing the above steps, XDDOPEN, XDDCHECK, and XDDCLOSE will be directly callable from the COBOL application.

See Also

TOCIndex