SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)
Host Variables in C/C++ Programs
HP NonStop SQL/MX Programming Manual for C and COBOL—523627-004
3-36
C Data Types Generated by INVOKE
Example 3-2 shows the structure generated by this INVOKE directive (with CHAR AS
STRING):
EXEC SQL INVOKE sqlcdata AS sqlc_types_struct;
struct sqlc_types_struct sqlc_types;
Example 3-2. C Structure Generated by INVOKE
/* Beginning of generated code for SQL INVOKE */
struct sqlc_types_struct{
long long syskey;
char /* CHARACTER SET ISO88591 */ type_char[11];
short type_char_null_i;
char /* CHARACTER SET ISO88591 */ type_char_null[11];
wchar_t /* CHARACTER SET UCS2 */ type_char_ucs2[11];
wchar_t /* CHARACTER SET UCS2 */ type_varchar_ucs2[11];
char /* CHARACTER SET ISO88591 */ type_picx[11];
char /* CHARACTER SET ISO88591 */ type_varchar[11];
short type_num4_s;
unsigned short type_num4_u;
long type_num9_s;
unsigned long type_num9_u;
long long type_num18_s;
short type_piccomp4_s;
unsigned short type_piccomp4_u;
long type_piccomp9_s;
unsigned long type_piccomp9_u;
long long type_piccomp18_s;
char type_dec4_s[6];
char type_dec4_u[6];
char type_dec9_s[11];
char type_dec9_u[11];
char type_dec18_s[20];
char type_pic4_s[6];
char type_pic4_u[6];
char type_pic9_s[11];
char type_pic9_u[11];
char type_pic18_s[20];
short type_small_s;
unsigned short type_small_u;
short type_small_null_i;
short type_small_null;
long type_int_s;
unsigned long type_int_u;
long long type_large_s;
float type_float_15;
double type_float_30;
float type_real;
double type_dbl_prec;
char type_date[11];
char type_time_6[9];
char type_timestamp_6[27];
char type_interval[7];
};