SQL Programming Manual for Pascal
NonStop SQL Version Issues
HP NonStop SQL Programming Manual for Pascal—528614-001
D-8
Recommendations for Installing Migrated Programs
migrate a C10 program to access columns defined to allow null values or use Version 2
data types, you must Pascal compile and SQL compile the program with C30
compilers.
Static SQL
The SQLDA structure is generated automatically by the language compiler for static
SQL. The SQLDA has additional fields in the C30 release to accommodate new data
types. To migrate a C10 program to access columns defined with the new data types,
add code to manage null values and host variables for new data types. Then compile
the program with the C30 release of the Pascal and SQL compilers.
Catalog Tables
The COLUMNS and FILES catalog tables have new columns in Version 2. To migrate
programs that query these catalog tables, you might need to recode to accommodate
the new columns. For the new columns, see Table D-1 on page D-3 earlier in this
appendix; for detailed information about the catalog tables, see the NonStop SQL
Installation and Management Manual.
Summary
Table D-3 summarizes the points in the preceding discussion.
Recommendations for Installing Migrated
Programs
You can upgrade a NonStop SQL C10 system to C30 and continue executing existing
programs. Existing C10 programs, using static statements, will continue to function as
C10 programs with respect to aggregate functions and subqueries when executed on a
NonStop SQL C30 system. However, when the programs are recompiled with C30
software, they will function as C30 programs. Data definition statements and dynamic
Table D-3. Accessing Version 2 Objects from a Version 1 Application
Situation Action To Take
Dynamic SQL
statements
Generate a RELEASE2 SQLDA structure. If handling null
values, allocate indicator variables and initialize the IND-PTR
field for each SQLVAR entry in the SQLDA. Pascal and SQL
compile with C30.
Static SQL statements Add code to manage null values and host variables for new
data types. Pascal and SQL compile with C30.
Statements that query
COLUMNS or FILES
catalog tables
If necessary, recode to accommodate new columns and new
column values. Pascal and SQL compile with C30.