ESQL Preprocessor Syntax and Operation

This is the syntax for the SQL preprocessor command. Many of the startup parameters are abbreviated, however, the long form is listed for each parameter that has one:

SYNTAX
sqlcpp { input-file [ output-file ] | -fl list-file }
     [ -debug ] 
     [ -qf ] [ -esqlnopad ]
     [ [ -a app-name ] -p parameters ] 

input-file

The filename of the ESQL source code file you want to preprocess (usually includes a .cc extension).

output-file

The filename (including any extension) you want to assign to the preprocessed pure C version of your source file. If you omit output-file, the preprocessor automatically assigns the name using the filename portion of input-file appended to a .c extension.

-fl list-file
-flist list-file
(long form)

Allows you to preprocess more than one ESQL source file at a time. The list-file parameter is the name of a text file that contains a list of filename pairs, one pair per line. Each pair is separated by a space. The first name is the name of the ESQL source file; the second (optional) is the name of the C output file. Omitting the second name causes the same effect as specifying only input-file without output-file on the command line.

-debug

Causes the preprocessor to provide the text of any static ESQL statements as readable comments. The preprocessor reformats ESQL requests as difficult-to-read character arrays to pass them to ESQL-LIB functions. Using this parameter generates a readable version of the SQL statement for debugging, and places it just before the corresponding function call. The preprocessor also blank-pads math operators (unless you also specify -esqlnopad) and translates scientific notation to the equivalent Progress decimal format.

-qf
-qflagger
(long form)

Displays warning messages whenever the preprocessor encounters nonstandard SQL in DML or DDL statements. The -qf parameter flags nonstandard DML only in precompile mode. It flags nonstandard DDL only in non-precompile mode (the only valid preprocessing mode for DDL statements).

-esqlnopad

Allows you to specify hyphenated names and language elements without escape characters ( \ ), as in the Progress 4GL. Unlike Progress fields, the hyphen is not a valid character for SQL column names because SQL always treats a hyphen as a minus sign. The expression qty-used means “qty minus used” in SQL, whereas Progress evaluates it as the field name, “qty-used”. To support standard SQL, the SQL preprocessor assumes the following:

-a app-name
-applnam app-name (long form)

(Precompile mode only.) Allows you to specify an application name that generates the names for your r-code files. The preprocessor uses the first two characters of app-name as a prefix for each r-code filename. It assigns the next six characters by generating a hexadecimal number from the text of the compiled SQL request, and adds the .r extension. If you do not specify this parameter, the preprocessor uses only the six hexadecimal characters plus the .r extension to generate the names for r-code files.

The full value of app-name must be identical to the application name you use when you call sqllogin() from within your application.

This parameter has no effect in non-precompile mode.

p parameters
-progress parameters
(long form)

This parameter performs two functions:


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095