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:
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 hyphen is a minus sign; if you type qty-used (without the escape character) then qty-used is blank padded to qty-used.
- If you type qty\-used, you are referring to the Progress field (column), qty-used.
The -esqlnopad parameter causes the preprocessor to treat all hyphens as hyphens and requires the application to ensure that minus symbols are blank-padded. This makes constructing queries against databases with hyphenated column names easier.
-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:
- It indicates that all the parameters that follow are Progress startup parameters.
- It tells the preprocessor to run in precompile mode.
The parameters string must contain all the database connection parameters that your application requires for execution. Be sure that all logical database names are the same as those your application uses when it connects to the databases.
The parameters string can also specify a parameter file using the Parameter File (-pf) startup parameter.
If your application connects to its databases by calling sqlconn(), enter the same database connection parameters on the command line that you enter for the sqlconn() calls in your program. For more information on database connection parameters and parameter files, see the Progress Startup Command and Parameter Reference.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |