SQL/MP Programming Manual for COBOL

Explicit Program Compilation
HP NonStop SQL/MP Programming Manual for COBOL529758-003
6-46
Using Compatible Components
Using Compatible Components
Before you compile an SQL program file, you might need to determine the versions of
the HP COBOL compiler, SQL compiler (SQLCOMP), and all SQL program files to
ensure that all components and files are compatible.
HP COBOL Compiler
The host SQL version (HSV) identifies the SQL version of the HP COBOL compiler.
A COBOL program that uses version 300 (or later) SQL features must be compiled
with a version of 300 (or later) HP COBOL compiler. To determine the version of the
HP COBOL compiler, use one of these methods:
Run the VPROC program for the HP COBOL compiler object file. VPROC displays
a line for each object bound into the target object file. Check the version in the
VPROC line that contains S7094, which is the SQL compiler interface (SCI)
product number.
When you run the HP COBOL compiler, specify the SQLMAP option in the SQL
compiler directive. The SQLMAP option directs the HP COBOL compiler to include
the HOSV in the map at the end of the source-file listing. For example, a
version 335 COBOL compiler listing includes this line:
Host Object SQL Version = 335
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 a NonStop
system, including the SQL compiler, must have the same version.
SQL Program File
An SQL program file has these versions:
Host object SQL version (HOSV) The version of the HP COBOL compiler used to
compile the program. Generated by the COBOL
compiler, the version is, therefore, the same as the
host SQL version (HSV) of the compiler.
Program format version (PFV) The version of the SQL compiler used to compile the
program and the oldest version of an SQL executor
that can execute the program. Generated by the SQL
compiler.
Program catalog version (PCV) The oldest version of an SQL catalog in which the
program can be registered. Generated by the SQL
compiler.