Explicit Program Compilation
HP NonStop SQL/MP Programming Manual for C—429847-008
6-38
Using Compatible Compilation Tools
A dynamic CONTROL directive affects only dynamic SQL statements prepared after
the CONTROL directive in execution order, except as noted.
Using Compatible Compilation Tools
CCompiler
The host SQL version (HSV) identifies the SQL version of the C compiler. A C program
that uses version 300 (or later) SQL features must be compiled with a C compiler that
has an HSV of 300 (or later). To determine the HSV of the C compiler, use one of these
methods:
ï‚·
Run the VPROC program for the C compiler object file. VPROC displays a line for
each object file bound into the target object file. For the C compiler, check the
version in the VPROC line that contains S7094, which is the SQL compiler
interface (SCI) product number.
ï‚·
When you run the C compiler, specify the SQLMAP option in the SQL compiler
directive. The SQLMAP option directs the C compiler to include the HOSV in the
map at the end of the source-file listing. For example, a version 310 C compiler
listing includes this line:
Host Object SQL Version = 310
SQL Compiler
The SQL compiler (SQLCOMP) must have the same version as (or later than) the
HOSV of the SQL program file. To determine the version of the SQL compiler, use the
GET VERSION OF SYSTEM statement. All SQL/MP components on the NonStop
operating system, including the SQL compiler, must have the same version.
SQL Program Files
An SQL program file has these versions:
Note. A dynamic CONTROL TABLE directive with the TIMEOUT option affects all static and
dynamic SQL statements that follow in execution order (as opposed to listing order) until
another dynamic CONTROL TABLE directive resets the TIMEOUT option or until the program
encounters the end of the RTDU that contains the CONTROL TABLE directive.
HOSV The version of the C compiler used to compile the program. Generated by the
C compiler and therefore the same as the host SQL version (HSV) of the
C compiler.
PFV The version of the SQL compiler used to compile the program. Indicates the
oldest version of the SQL executor that can run the program. Generated by the
SQL compiler.
PCV The oldest version of the SQL catalog in which the program can be registered.
Generated by the SQL compiler.