


You can start the pre-compiler from the ACUCOBOL-GT command line with either of the following compiler switches:
-Pn causes ACUCOBOL-GT to only pre-compile the named file. Successful pre-compilation creates an intermediate COBOL file named "input-file-name.asq" by default.
-Ps causes ACUCOBOL-GT to pre-compile and compile the specified source file.
The following additional switches affect pre-compiler behavior:
-e file-name causes all error messages to be written to the specified file
-Pc directs the pre-compiler to connect to and use the database engine to perform
SQL syntax checking. This switch should be used in conjunction with the "-Pd",
"-Pu", and "-Pp" switches, or with the environment variables ACUSQL_DATASET, ACUSQL_USER, and ACUSQL_PASSWORD (see Section 3.3 Environment Variables), or with some combination of switches and environment variables. Values
given on the command line take precedence over values held by environment
variables.
Note that during syntax verification, in some cases an error message may be converted to a warning message in order to prevent the compiler from aborting. The text of the warning message preserves the text of the error message.
-Pd dataset is used in conjunction with the "-Pc" option and must be followed by the name of the ODBC API driver to use (Windows users refer to this value as the User DSN).
-Pi dir specifies the path that the pre-compiler will search to locate files named in ESQL INCLUDE statements. For example "-Pi c:\SQL\include\" will cause the pre-compiler to look in the "C:\SQL\include" directory for files named in SQL INCLUDE statements. You can also specify a search path via the ACUSQL_INCLUDE environment variable (see Section 3.3 Environment Variables). Note that "-Pi" takes precedence over ACUSQL_INCLUDE when both are used.
-Pk rlist directs the pre-compiler to use the designated reserved word set for syntax checking. rlist can be "DB2", to use the DB2 word set, or "EXT", to use the extended reserved word set. EXT is the default.
-Po file-name causes the intermediate file to be given the specified name.
-Pp password is used in conjunction with the "-Pc" option and must be followed by the password that matches the username specified by the "-Pu" switch or by the ACUSQL_USER environment variable.
-Pr directs the pre-compiler to perform relaxed syntax checking. "-Pr" is intended for use in situations where the embedded SQL syntax does not conform to IBM SQL or SQL92, but is correct for the database that you want to access.
"-Pr" does not perform syntax checking on the following statements:
SELECT INTO FROM
VALUES
DELETE
INSERT
DECLARE CURSOR FOR SELECT
UPDATE
NOTE: The syntax of the ALTER, CREATE, and GRANT statements is not checked by either the "-Pr" or "-Pk rlist" modes. These statements are only checked when you use the "-Pc" mode to connect directly to the database engine.
-Pu username is used in conjunction with the "-Pc" option and must be followed by the username of an authorized database user.
-Pw causes the pre-compiler to dump the current reserved word list to standard output (use the "-Pk" option to set the reserved word list). No pre-compilation or compilation is performed. Note that "-Pw" should not be used with any other pre-compiler switches. In AcuBench, "-Pw" must be specified in the Additional options entry field at the top-right of the File Compiler Options dialog box.
-Sa indicates that the input file is in ANSI format
-Sd includes debug information
-Si pattern directs the pre-compiler to perform the specified include pattern substitution before initiating pre-compilation
-St indicates that the input file is in terminal format
-Sx pattern directs the pre-compiler to perform the specified exclude pattern substitution before initiating pre-compilation