The ACUSQL pre-compiler offers three modes of SQL syntax checking.
- The first mode, specified with the
-Pk switch, uses internal reserved word lists and syntax rules to check IBM DB2 SQL, Transact-SQL, or ISO/ANSI SQL 92.
- The second mode, called
relaxed mode, is enabled with the
-Pr switch and provides only minimal syntax checking. It is intended for use with unspecified SQL variants.
- The third mode establishes a direct connection to the target database engine and uses the engine to directly check the syntax.
This option is specified with the
Pc switch. Note that for this mode to be effective, your ODBC API middleware must support the return of syntax error messages
(not all ODBC drivers do). Also note that during syntax verification it is possible that some error messages will be converted
to warning messages. This is done, when possible, to prevent the compiler from aborting so that syntax checking can continue.
The text of the warning message preserves the text of the error message.
These modes operate on the file as a whole. See
Checking Syntax for information on indicating relaxed or strict checking for individual EXEC SQL commands.
When the pre-compiler starts, it examines the source file to determine whether it is in ANSI or terminal format and then processes
the file accordingly. If the file is in ANSI format, the pre-compiler removes characters from columns 1-6 and 72-80, replacing
them with spaces. Information contained in these columns may not appear in the ACUCOBOL-GT compilation listing file.
You can start and use the AcuSQL pre-compiler in several ways:
- From AcuBench
- As a standalone program from the command line
- From the compiler command line