SQL/MP Programming Manual for C
Explicit Program Compilation
HP NonStop SQL/MP Programming Manual for C—429847-008
6-8
Specifying the SQL Pragma in the Guardian
Environment
SQLMAP directs the C compiler to include an SQL map in the listing. An SQL map
contains:
Each run-time data unit (RTDU), which is a region of the object file that
contains both SQL source statements and object code.
Section location table (SLT) index number.
Source file name and number.
Source file line number.
The table is sorted first by RTDU name and then by the SLT index number. Use
this table to correlate Measure output with the SQL statement. The global RTDU
contains the cursors and CONTROL directives declared in the global declarations.
The SQLMAP option also directs the C compiler to include the HOSV in the
compiler listing as:
Host Object SQL Version = 310
NOSQLMAP (the default) causes the SQL map not to be added.
RELEASE1 | RELEASE2
specifies the version of the SQL/MP features in the program (including the SQL
data structures) and the version of SQL/MP software on which the program file can
run.
RELEASE1 specifies version 1 features. A program that uses the RELEASE1
option is compatible with SQL/MP version 1, 2, or 300 (or later) software.
RELEASE2 (the default) specifies version 2 features. A program that uses the
RELEASE2 option is compatible with SQL/MP version 2 or version 300 (or later)
software but not with version 1 software.
CPPSOURCE "filename"
directs the C compiler to generate a preprocessed C source file with the name
filename, which must be a valid Guardian file name. The generated file is empty,
except for SQL source RTDUs. The CPPSOURCE option is not valid with the
RELEASE1 option or a macro expansion that contains any part of an SQL
statement. This option is intended primarily for use with the Distributed Workbench
Facility (DWF).
Note. Although the C compiler allows the use of RELEASE1 and RELEASE2 options,
these options might not be supported in a future RVU. If you are using a version 300 (or
later) C compiler to generate data structures, use the INCLUDE STRUCTURES directive
with the VERSION 1 or VERSION 2 option.