SQL/MX 2.x Database and Application Migration Guide (G06.23+, H06.04+, J06.03+)

Migrating SQL/MX Release 1.8 Applications to
SQL/MX Release 2.x
HP NonStop SQL/MX Database and Application Migration Guide540435-005
7-5
Using INVOKE for Date-Time and Interval Host
Variables
SQL/MX Release 1.8 Floating-Point Format
In SQL/MX Release 1.8, all floating-point data types are in Tandem format, and all SQL
computations on floating-point data are done in Tandem format.
SQL/MX Release 2.x Floating-Point Format
In SQL/MX Release 2.x, all SQL computations on floating-point data are done in IEEE
format regardless of the floating-point format of a column, which is Tandem for
SQL/MP tables, or a host variable, which is Tandem by default.
Effect of the New Behavior on SQL/MX Applications
In SQL/MX Release 2.x, the SQL/MX executor converts input Tandem floating-point
data to IEEE floating-point format for internal processing and then converts the data
back to Tandem format for output to Tandem floating-point host variables. This
conversion can result in slight changes to the value of the Tandem floating-point field.
However, floating-point data is an approximate representation of a value, so these
slight changes should not adversely affect applications.
For more information about using floating-point data types, see the
SQL/MX
Programming Manual for C and COBOL.
Using INVOKE for Date-Time and Interval Host Variables
In an embedded SQL/MX application, the INVOKE directive generates structures with
the names of host variables corresponding to columns in a table or view. The INVOKE
directive can generate host variables corresponding to date-time and interval columns.
SQL/MX Release 1.8 Date-Time and Interval Host Variables
SQL/MX Release 1.8 does not support SQL:1999 date-time host variables. In SQL/MX
Release 1.8 applications, you must declare a character array host variable for date-
time or interval data and use the CAST function for input or output from date-time or
interval columns. In SQL/MX Release 1.8, INVOKE generates a structure with
character array host variables for date-time and interval columns in an SQL/MP table.
SQL/MX Release 2.x Date-Time and Interval Host Variables
SQL/MX Release 2.x supports SQL:1999 date-time host variables. In SQL/MX Release
2.x applications, you can declare date-time or interval host variables for date-time or
interval data and avoid using the CAST function. In SQL/MX Release 2.x, INVOKE
generates a structure with SQL:1999 date-time host variables for date-time and interval
columns in an SQL/MP table.