C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
13-88
SQL
If you do not specify either SQLMAP or NOSQLMAP, the C compiler assumes
NOSQLMAP.
RELEASE1 | RELEASE2
specifies the earliest release of NonStop SQL/MP that supports the features used
in the embedded SQL statements. If you do not specify either RELEASE1 or
RELEASE2, the C compiler uses the version of SQL that is installed on the
compilation system. The latest current version of SQL is 345.
RELEASE1
specifies that the embedded SQL statements require features first available in
NonStop SQL Release 1. Consequently, the resultant program can execute on
a system that supports either Release 1 or Release 2 of NonStop SQL. This
option cannot be used for native C programs.
RELEASE2
specifies that the embedded SQL statements require features first available in
NonStop SQL Release 2. Consequently, the resultant program can execute
only on a system that supports Release 2 of NonStop SQL.
CHAR_AS_ARRAY | CHAR_AS_STRING
specifies whether a C string that is used as an SQL host variable contains an extra
byte for the null terminator. CHAR_AS_STRING is the default setting.
CHAR_AS_ARRAY
specifies a C string without the extra byte.
CHAR_AS_STRING
specifies a C string with the extra byte for the null terminator.
CPPSOURCE "filename"
directs the TNS C compiler to generate a preprocessed C source file with the given
file name. filename must be a valid Guardian file name. The generated file is
empty except for SQL source RTDUs. When using this flag, a macro expansion
cannot contain any part of an SQL statement and the RELEASE1 SQL pragma
option cannot be used. This option is intended primarily for use with the Distributed
Workbench Facility (DWF). Note that CPPSOURCE is not supported for native mode
C.