SQL/MX 3.2.1 Programming Manual for C and COBOL (H06.26+, J06.15+)

Host Variables in C/C++ Programs
HP NonStop SQL/MX Release 3.2.1 Programming Manual for C and COBOL663854-005
3-44
INVOKE and Date-Time and Interval Host Variables
(SQL/MX Release 1.8 Applications)
The struct declaration declares structure-instance to be a structure of the type
named structure-name. You must declare a variable of the struct type so that
you can use that variable in your C language statements.
If you do not specify the AS clause in the INVOKE statement, the default structure
name is the simple name of the table or view with the suffix _type appended. For
example: mytable_type.
INVOKE and Date-Time and Interval Host Variables (SQL/MX
Release 1.8 Applications)
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.
If your SQL/MX Release 1.8 application uses INVOKE to create a date-time or interval
host variable and you plan to preprocess the application in SQL/MX Release 2.x, use
the -e preprocessor option. Otherwise, SQL/MX Release 2.x returns an error during
SQL compilation because the CAST function in the program is incompatible with the
SQL:1999 date-time host variables created by INVOKE in SQL/MX Release 2.x.
For more information, see Running the SQL/MX C/C++ Preprocessor on page 15-8.
Note. This issue affects only SQL/MX Release 1.8 applications preprocessed by SQL/MX
Release 2.x. Previously compiled SQL/MX Release 1.8 applications continue to run correctly
without changes in SQL/MX Release 2.x.