To specify ANSI-compliant behavior when creating embedded SQL programs, use the following flags when invoking the Ingres embedded SQL preprocessor. For details about the preprocessor, see the Embedded SQL Companion Guide.
The -wsql ESQL preprocessor flag directs the preprocessor to issue warnings when it detects SQL statements that do not comply with ANSI/ISO Entry SQL-92.wsql flag ANSI/ISO standard:handling non-compliant SQL statements flags, ESQL preprocessor:wsql
Specify -wsql=entry_sql92.
By default, the preprocessor does not issue warnings when it detects non-compliant SQL statements.
The -blank_pad ESQL preprocessor flag specifies how values are padded with blanks when selecting values from character columns into host string variables. This flag has no effect in host languages that do not support variable-length character data (for example, Fortran).
Specify -blank_pad. The host variable is padded with blanks to its declared size. For example, if you select a value from a column defined as char(5) into a 10-byte character variable, the host variable is padded with blanks to its full length of 10 bytes.
By default, the receiving variable is padded with blanks to the width of the column from which data is selected. This flag affects the results of the following SQL statements:
The -sqlcode ESQL preprocessor flag incorporates the declaration required for the ANSI standard SQLCODE status variable. For details about SQLCODE, see SQLCODE and SQLSTATE in the chapter "Working with Transactions and Error Handling" and the ANSI standard. SQLCODE is a depreciated ANSI feature -SQLSTATE is the recommended status variable. For details, see the Embedded SQL Companion Guide.
Specify -sqlcode if your program declares SQLCODE outside of an SQL declare section. This flag is optional if your source code declares SQLCODE in a declare section. To see SQLCODE, your source code must also contain an include sqlca statement. (Some host languages require the -sqlcode flag regardless of where SQLCODE is declared. For details, see the Embedded SQL Companion Guide.)
There is no default. Ingres provides other proprietary methods for checking program status and error conditions. For details, see the chapter "Working with Transactions and Error Handling." If your source code declares a variable named SQLCODE that is not intended to be used for the ANSI status variable, specify the - nosqlcode flag to prevent Ingres from writing ANSI status information into the variable.
The -check_eos ESQL preprocessor flag directs the ESQL preprocessor to include code that ensures that all char strings inserted into a database are terminated with a null character (\0). By default, no checking is performed. Checking is performed only for char strings declared as arrays, and is not performed for strings declared as string pointers.
Specify -check_eos. If your ESQL/C application attempts to insert a string that is not null-terminated, the DBMS returns an error (SQLSTATE 22024).
No checking is performed.