SQL Programming Manual for Pascal

NonStop SQL Version Issues
HP NonStop SQL Programming Manual for Pascal528614-001
D-4
Migrating an Application to Run on Release 2 (C30)
Migrating an Application to Run on Release 2
(C30)
These NonStop SQL C30 enhancements can affect migrated C10 programs. You need
to be aware of these differences to develop programs that can run in a mixed SQL
version environment.
Column definition
The default column definition has changed to allow null values. This change
applies to the CREATE TABLE and ALTER TABLE ADD COLUMN statements. The
C10 column defaults were SYSTEM DEFAULT and NOT NULL. The C30 column
Table D-2. Summary of Incompatible C30 Feature Changes
C10 Program Operation Required Change
DDL statements that create column
definitions and omit the NOT NULL
clause or the SYSTEM DEFAULT
clause.
Explicitly include the NOT NULL and SYSTEM
DEFAULT clauses in the CREATE TABLE or
ALTER TABLE ADD COLUMN statements to
ensure the same column definition produced by
C10.
Programs that test for error 100 to
determine if an aggregate function
(AVG, MAX, MIN, or SUM) returned
an empty set.
Change the test for an empty set to a test for
NULL or for error 8423. To test for a NULL
requires a null indicator variable.
Programs that use new C30 reserved
words INNER, JOIN, and LEFT as
column names, constraint names,
correlation names, cursor names, or
statement names.
Change all names that use INNER, JOIN, or
LEFT.
Programs that query catalog tables
COLUMNS, COMMENTS, and FILES.
To access Version 2 catalogs, change the queries
affected by new columns or new column
information in these catalog tables.
Static SQL programs that access
tables.
To access Version 2 tables or views that have
Version 2 data types, language compile and SQL
compile to get internal structures to handle the
data.
To access Version 2 tables or views that allow null
values, add program code to handle the possible
null values.
Dynamic SQL programs that initialize
the SQLDA.
To access Version 2 tables or views, initialize and
use the C30 (RELEASE2) SQLDA structure; add
code to handle possible null values.