Option Switches

From InterBase
Jump to: navigation, search

Go Up to Using gpre


The option switches specify preprocessing options. The following table describes the available switches:

gpre option switches
Switch Description

-charset <name>

Determines the active character set at compile time, where <name> is the character set name.

-d[atabase] <filename>

Declares a database for programs. <filename> is the file name of the database to access. Use this option if a program contains SQL statements and does not attach to the database itself. Do not use this option if the program includes a database­ declaration.

-d_float

VAX/VMS only. Specifies that double-precision data will be passed from the application in D_FLOAT format and stored in the database in G_FLOAT format. Data comparisons within the database will be performed in G_FLOAT format. Data returned to the application from the database will be in D_FLOAT format.

-e[ither_case]

Enables gpre to recognize both uppercase and lowercase. Use the -either_case switch whenever SQL keywords appear in code in lowercase letters. If case is mixed, and this switch is not used, gpre cannot process the input file. This switch is not
necessary with languages other than C, since they are case-insensitive.

-m[anual]

Suppresses the automatic generation of transactions. Use the
-m switch for SQL programs that perform their own transaction handling, and for all DSQL programs that must, by definition, explicitly control their own transactions.

-n[o_lines]

Suppresses line numbers for C programs.

-o[utput]

Directs the output of gpre to standard output, rather than to a file.

-password <password>

Specifies <password>, the database password, if the program ­connects to a database that requires one.

-r[aw]

Prints BLR as raw numbers, rather than as their mnemonic equivalents. This option can be useful for making the gpre ­output file smaller; however, it will be unreadable.

-sql_dialect

Sets the SQL dialect. Valid values are 1, 2, and 3.

-user <username>

Specifies <username>, the database user name, if the program connects to a database that requires one.

-x <handle>

Gives the database handle identified with the -database option an external declaration. This option directs the program to pick up a global declaration from another linked module. Use only if the -d switch is also used.

-z

Prints the version number of gpre and the version number of all declared databases. These databases can be declared either in the program or with the -database switch.

For sites with the appropriate license and are using a language other than C, additional gpre options can be specified, as described in the following table:

Language-specific gpre option switches
Switch Description

-h[andles] <pkg>

Specifies, <pkg>, an Ada handles package.