SQL/MP Version Management Guide

Program Versions
Compaq NonStop™ SQL/MP Version Management Guide429833-001
5-12
SQL Data Structure Versions
For example, suppose you want to restore from tape a program file named
$VOL1.MYSVOL.PROGX, which is registered in the catalog $VOL1.CAT1. To display
the catalog and format versions of the program, type:
32> RESTORE $TAPE,*.*.*, LISTALL,AUDITED,SQLCOMPILEON,DETAIL;
The RESTORE utility restores the program file as an SQL program to its original
location and registers the program in its original catalog. The DETAIL option produces
the following display:
$VOL1.MYSVOL
PROGX *WARNING* SQL COMPILE of program file was successful
$VOL1.CAT1.POBJ
ENSCRIBE ( VALID SQL PROGRAM )
CATALOG $VOL1.CAT1
PCV 1
PFV 315
TYPE U
CODE 100
EXT (22 PAGES, 10 PAGES)
MAXEXTENTS 16
.
.
In the resulting output, the program catalog version is listed as 1, and the program
format version is listed as 315.
SQL Data Structure Versions
When a host language compiler processes a program that contains embedded SQL, the
compiler creates the following three data structures in which SQL/MP writes program
error and status information:
These three data structures are known collectively as the SQL data structures.
The versions of the SQL data structures change from one version of SQL/MP software
to the next. Each time a new version of SQL/MP software is released, a new version
number is assigned to each SQL data structure. This new version number always
corresponds to the version of SQL/MP software with which it was released.
When a host language compiler compiles a source file that contains embedded SQL, the
SQL data structures it generates are always the newest versions available. (The SQL
compiler also assigns the newest program format version to an existing SQL program
when it recompiles the program.)
SQL
communications area
(SQLCA)
A structure that contains errors, warnings, and other run-time
information generated by the most recently executed dynamic
or static SQL statement
SQL statistics area
(SQLSA)
A structure that contains statistics and performance
information following execution of DML statements or of
some dynamic SQL statements
SQL descriptor area
(SQLDA)
A structure that contains information about input parameters
and output variables used in dynamic SQL statements