SQL Programming Manual for Pascal

NonStop SQL Version Issues
HP NonStop SQL Programming Manual for Pascal528614-001
D-12
Programming Techniques for Mixed Versions
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.
For more information on the descriptions of these procedures, see Section 4, NonStop
SQL System Procedures.
For C10 programs to use procedures for handling mixed versions, program code must
include the procedure declarations. For information about including the declarations,
see the TSQLEXE (T9193C10^15MAR89, T9193AAF) component softdoc for the C10
versioning IPM.
For C30 programs, external declarations for the procedures are included in the
PEXTDECS system file.
Programming Techniques for Mixed Versions
Programs that handle mixed versions can be C30 programs that handle Version 1 and
Version 2 catalogs and objects. More complex programs can run on multiple release
levels of NonStop SQL software and handle Version 1 and Version 2 catalogs and
objects.
Generic Release Programs
A program that can run on multiple release levels is called a generic release program.
The programming techniques for developing generic release programs are discussed
as follows:
Handling mixed object versions
Running on multiple NonStop SQL releases
Using the single-code thread design
Handling Mixed Object Versions
Both generic release programs and programs that run only on NonStop SQL C30
systems will need to use the following techniques to handle objects of mixed versions.
These steps are necessary if the program is sensitive to objects of different versions; if
the program does not contain explicit version checking code, NonStop SQL will return
errors when version incompatibilities arise.
Include the procedures for handling mixed versions in the program code to test for
the NonStop SQL object version or catalog version. The program can handle either
version by deciding which code to execute depending on information returned by
the procedures.
Include two sets of catalog queries if the program queries the catalogs and is
sensitive to the difference between Version 1 and Version 2 catalogs. Before