This section provides the syntax of iqsqlpp and describes the iqsqlpp command-line options.
iqsqlpp [ options ] <in filename > [<out filename> ]
Table 5-1 lists the options available for the iqsqlpp utility.
Option |
Description |
---|---|
-d |
Favor data size. |
-e <level> |
Flag nonconforming SQL syntax as an error. The allowed values of <level> are:
The following are also supported for compatibility with previous versions: e (for entry-level SQL92), i, (for intermediate-level SQL92), f (for full SQL92), and w (to allow all supported syntax). |
-h <width> |
Limit the maximum line length of output. |
-k |
Include user declaration of SQLCODE. |
-n |
Line numbers. |
-o <O/S spec> |
Target operating system specification (WINDOWS, WINNT or UNIX). |
-q |
Quiet mode—do not print banner. |
-r- |
Generate reentrant code. |
-s <len> |
Maximum string constant length for the compiler. |
-w <level> |
Flag nonconforming SQL syntax as a warning. The allowed values of <level> are:
|
-x |
Change multibyte SQL strings to escape sequences. |
-z <cs> |
Specify the collation sequence. For a list of recommended collation sequences, enter iqinit -l at a command prompt. |
The SQL preprocessor processes a C or C++ program containing Embedded SQL before the compiler is run. iqsqlpp translates the SQL statements in the input file sql-filename into C language source that is put into the output-filename. The normal extension for source programs with Embedded SQL is .sqc. The default output file name is the sql-filename with an extension of .c. If the sql-filename has a .c extension, the default output file name extension is .CC.
-d Favor data size. Generate code that reduces data space size. Data structures are reused and initialized at execution time before use. This increases code size.
-e <flag> This option flags, as an error, any Embedded SQL that is not part of a specified set of SQL92.
The allowed values of <flag> and their meanings are as follows:
-h width Limits the maximum length of lines output by iqsqlpp to width. The continuation character is a backslash (\), and the minimum value of width is ten.
-k Notifies the preprocessor that the program to be compiled includes a user declaration of SQLCODE.
-n Generate line number information in the C file. This consists of #line directives in the appropriate places in the generated C code. If the compiler you are using supports the #line directive, this option makes the compiler report errors on line numbers in the SQC file (the file with the Embedded SQL) as opposed to reporting errors on line numbers in the C file generated by the SQL preprocessor. Also, the #line directives are used indirectly by the source level debugger so that you can debug while viewing the SQC source file.
-o <O/S spec> Specify the target operating system. This option must match the operating system where you run the program. A reference to a special symbol is generated in your program. This symbol is defined in the interface library. If you use the wrong operating system specification or the wrong library, an error is detected by the linker. The supported operating systems are:
UNIX Use this option if you are creating a 32-bit UNIX application.
UNIX64 Use this option if you are creating a 64-bit UNIX application.
-q Operate quietly. Do not print the banner.
-r- Generate reentrant code. For more information on reentrant code, see "SQLCA management for multi-threaded or reentrant code" in SQL Anywhere Server – Programming.
-s <len> Set the maximum size string that the preprocessor puts into the C file. Strings longer than this value are initialized using a list of characters (“a,” “b,” “c,” and so on). Most C compilers have a limit on the size of string literal they can handle. This option is used to set that upper limit. The default value is 500.
-w <flag> This option flags any Embedded SQL that is not part of a specified set of SQL92 as a warning.
The allowed values of <flag> and their meanings are as follows:
-x Change multibyte strings to escape sequences so that they can pass through compilers.
-z <cs> This option specifies the collation sequence. For a list of recommended collation sequences, enter iqinit -l at a command prompt.
The collation sequence helps the preprocessor understand the characters used in the source code of the program, for example, in identifying alphabetic characters suitable for use in identifiers. If you do not specify -z, the preprocessor attempts to determine a reasonable collation to use, based on the operating system and the SALANG and SACHARSET environment variables.
in SQL Anywhere Server – Programming
“SQL Preprocessor messages” in Error Messages.