TOCPREVNEXTINDEX

AcuSQL User's Guide
Version 6.0

3.2.2 Invoking the Pre-compiler From the ACUCOBOL-GT Command Line

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; 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 data source to use.

-Pg precompiler_name

causes ACUCOBOL-GT to call the named precompiler(s). See section 2.12 of the ACUCOGOL-GT User's Guide for additional information on the "-Pg" switch and calling precompilers.

-Pi dir

specifies the path that the pre-compiler will search to locate files named in SQL INCLUDE statements. For example "-Pi c:\SQL\include\" causes 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, "MSSQL" to use the Microsoft SQL Server word set, or "EXT", to use the extended reserved word set. "EXT" is the default.


Note: The syntax of the ALTER, CREATE, and GRANT statements is not checked by either the "-Pr" or "-Pk rlist" modes. These statements are checked only when you use the "-Pc" mode to connect directly to the database engine.

-Po file-name

causes the intermediate file to be given the specified name and prevents it from being deleted after it is compiled..

-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, Transact-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 checked only 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.


Note: When this option is used, the pre-compiler removes all characters from columns 1-6 and 72-80, replacing them with spaces. Information contained in these columns will not appear in the ACUCOBOL-GT compilation listing file.

-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.


Acucorp, Inc.
Voice: (800) 262-6585 (U.S.A. and Canada)
Voice: (858) 689-4500
Fax: (858) 689-4550

Please share your comments on this manual
or on any Acucorp documentation with the
Acucorp Communications Department.
TOCPREVNEXTINDEX
1988-2003 Acucorp, Inc.
All rights reserved.