SQL Programming Manual for Pascal

NonStop SQL Version Issues
HP NonStop SQL Programming Manual for Pascal528614-001
D-11
Programmatic Features for Version Control
3. SQL compile the resulting object file with the C30 SQL compiler.
Programmatic Features for Version Control
The NonStop SQL programming interface provides several features to assist you in
developing programs to handle mixed versions. These features include release
specification options and procedures that report the version of various SQL objects.
Release Specification Options
Release specification options are available in the SQL directive. When a program
specifies the RELEASE1 or RELEASE2 option, the C30 host language compiler
generates code that is intended to be executed on a C10 or C30 system, respectively.
A program compiled with the RELEASE2 specification can be executed only on a C30
system. A program compiled with the RELEASE1 specification can be executed on a
C10 or C30 system because of upward compatibility.
Both the RELEASE1 and RELEASE2 options can also be specified with the INCLUDE
SQLDA directive.
By default, the generated SQLDA structure is compatible with the version of the Pascal
compiler or the version specified in the SQL directive. You can, however, specify
another release version in the INCLUDE SQLDA directive. You can include several
INCLUDE SQLDA directives with each specifying a different release option as
appropriate for program logic. For the descriptions of the different SQLDA structures,
see the INCLUDE SQLDA directive in Section 6, Error and Status Processing.
Version Information Procedures
In a NonStop SQL mixed-version environment, programs might need to determine the
version of objects. The following procedures enable programs to obtain NonStop SQL
version information:
SQLGETCATALOGVERSION
Returns a value that indicates the version of an SQL catalog.
SQLGETOBJECTVERSION
Returns a value that indicates the version of an SQL object. This value represents
the earliest release of SQL that can perform all DML and most DDL operations
defined for a given SQL table, index, or view.
Note. Do not:
Pass C10 SQLDA structures from C10/C30 modules to C30 modules
Pass C30 SQLDA structures from C10/C30 modules to C10 modules