SQL Programming Manual for TAL

NonStop SQL Version Issues
HP NonStop SQL Programming Manual for TAL527887-001
D-11
Mixed-Version Programmatic Features
Mixed-Version Programmatic Features
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.
Release specification options are also available in the INCLUDE SQLDA directive.
RELEASE1 and RELEASE2 options are valid.
By default, the generated SQLDA structure is compatible with the version of the TAL
compiler or the version specified in the SQL directive. You can, however, specify
another release version in the INCLUDE SQLDA directive. You can include two
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
.
System Procedures
In a NonStop SQL mixed-version environment, a program might need to determine the
version of SQL objects. Use these procedures to determine 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 SQL release that can perform all DML and most DDL operations
defined for a given SQL table, index, or view.
SQLGETSYSTEMVERSION
Returns a value that indicates the version of the SQL file system and disk process
components on a given system. All other NonStop SQL components are
considered to be the same version.
See Section 4, System Procedures
, for the descriptions of these procedures.
For C10 programs to use these procedures, the program must include the procedure
declarations. For information about including the declarations, see the TSQLEXE