ContentsIndexprev0.gifNext

1.1 Overview

Welcome to AcuSQL. AcuSQL is an add-on tool to the ACUCOBOLTM-GT development system that supports embedded SQL (ESQL) COBOL programs. AcuSQL is part of the extendTM family of Acucorp solutions and is designed to give COBOL applications access to a variety of database systems including IBM DB2, MSSQL, DBMaker, and other ODBC accessible data sources. For this release, under Windows, Acucorp has tested access to DB2, MSSQL, MS Access, DBMaker, and Oracle data sources. Under UNIX, Acucorp has tested access to DB2 and Oracle data sources. AcuSQL is available for 32-bit Windows systems (Windows 95, Windows 98, Windows NT, and Windows 2000) and for most UNIX platforms.

AcuSQL support for ESQL is provided by a special pre-compiler and runtime library. The pre-compiler gives you the option of specifying various levels of SQL syntax checking, including a mode that is specific to IBM DB2 SQL and a mode that directs the pre-compiler to send SQL statements directly to the database engine for syntax verification. These syntax checking options give you a great deal of flexibility in developing your ESQL applications.

The AcuSQL pre-compiler works by scanning the COBOL source file for ESQL statements. It preserves the original statements in a comment block, performs syntax checking (either directly or indirectly), and then translates each statement into a standard COBOL CALL statement to the AcuSQL runtime library. All other code is untouched. Successful pre-compilation results in the creation of a temporary file that is used as input to standard ACUCOBOL-GT compilation. The default is to remove this file, but it can be saved.

Successful pre-compilation followed by successful compilation results in the creation of an object file. The object file is ready for immediate execution by the runtime. When the object file is executed, the embedded SQL statements (now standard COBOL statements) are passed to the AcuSQL library, which in turn communicates with the database connectivity software (an ODBC level 2 API), establishing connections, retrieving and writing data, and exchanging messages.

sql00000.gif

The AcuSQL development and deployment model.

Pre-compilation is initiated from within AcuBench or from the ACUCOBOL-GT command line. In AcuBench, when you set the "pre-compile" option on an ESQL file, the workbench automatically pre-compiles the file every time the project is built or the file is compiled. All pre-compilation errors are displayed in the AcuBench Output Window. On the ACUCOBOL-GT command line a set of compiler flags initiates pre-compilation. Error messages are directed to standard output.