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

The pragma default settings are:
SYSTYPE OSSSYSTYPE GUARDIAN
Not setNot setTNS C compiler
Not set for C, N.A. for C++Not set for C, N.A. for C++G-series TNS c89 utility
Not set for C, N.A. for C++Not set for C, N.A. for C++TNS/R native C and C++ compilers
Not set for C, N.A. for C++Not set for C, N.A. for C++Native c89 utility
N.A.N.A.c99 utility
Not set for C, N.A. for C++Not set for C, N.A. for C++TNS/E native C and C++ compilers
Usage Guidelines
For the native compilers, the SQL pragma can appear on the Guardian compiler RUN command
line or be specified with the -Wsql or -Wsqlcomp flag of the c89 utility. For the TNS C
compiler, the SQL pragma can be specified at the start of the source text, before any
declarations or definitions except comments.
With the SQL pragma, exec and sql become C keywords. Note that decimal is a predefined
data type.
For native C, the SQL pragma implicitly specifies the EXTENSIONS pragma and defines
_TANDEM_SOURCE.
For native mode C, RELEASE1 cannot be specified.
For native mode C, the CPPSOURCE option is not supported.
If you specify the IEEE_FLOAT pragma, you cannot also specify the SQL pragma.
For TNS/E-targeted compilations, specifying the SQL pragma overrides the floating-point
default and TANDEM_FLOAT is used.
For compiling embedded SQL using the c89 utility in the OSS environment, there are two
related flags:
Use -Wsql to compile a source file containing embedded SQL.
Use -Wsqlcomp -o to run the SQLCOMP compiler on an executable file containing
SQL (specify the executable file with the -o option).
You can compile, link, and run SQLCOMP on a program in one step by specifying both of
these flags in one command line.
For more details about the interface from a C program to a NonStop SQL/MP database, see
the SQL/MP Programming Manual for C.
The SQL pragma pertains only to SQL/MP, and not to SQL/MX. For more details about the
interface from a native C or C++ program to a NonStop SQL/MX database, see the SQL/MX
Programming Manual for C and COBOL.
For PC compilations, many more options exist. See the documentation for the apppropriate
PC-based compilation tool.
SQLMEM
The SQLMEM pragma provides the ability to alter the placement of SQL data structures from extended
memory to the user data segment.
The default setting is SQLMEM EXT.
240 Compiler Pragmas