Host Variables
HP NonStop SQL/MP Programming Manual for C—429847-008
2-22
Using Indicator Variables With the INVOKE Directive
Using Indicator Variables With the INVOKE Directive
The INVOKE directive automatically generates a two-byte indicator variable with data
type short for each host variable corresponding to a column that allows a null value.
The name of the indicator variable is the same as the name of the corresponding
column plus a prefix, if you specify one, and a suffix. When you do not specify a prefix
or suffix, INVOKE appends the default suffix _I to the indicator variable name.
If a column name is 30 or 31 characters and the default indicator suffix
_I
is used, the
_I
is truncated, and the indicator variable name is then identical to the corresponding
host variable name. To prevent this problem, use the PREFIX or NULL STRUCTURE
clause for column names that are 30 or 31 characters.
The format of the indicator variable name depends on the PREFIX, SUFFIX, and NULL
STRUCTURE clauses.
char type_time[9];
char type_timestamp[27];
char type_interval[7];
short type_char_null_ok_i;
char type_char_null_ok[11];
short type_num_null_ok_i;
short type_num_null_ok; };
/* Record Definition for table \NEWYORK.$DISK1.SQL.TYPESC2
*/
/* Definition current at 13:52:19 - 8/27/96 */
struct typesc2_type {
char CHARACTER SET ISO88591 type_char1[11];
short type_char1_null_i;
char CHARACTER SET ISO88591
type_char1_null[11];
char CHARACTER SET KANJI type_char2[11];
short type_char2_null_i;
char CHARACTER SET KANJI type_char2_null[11];
char CHARACTER SET KANJI type_nchar[11];
struct {
short len;
char CHARACTER SET KANJI val[11];
} type_nchar_v;
struct {
short len;
char CHARACTER SET ISO88591 val[11];
} type_varchar1;
struct {
short len;
char CHARACTER SET KANJI val[11];
} type_varchar2;
char CHARACTER SET ISO88591 type_picx1[11];
char CHARACTER SET KANJI type_picx2[11];
};
Example 2-3. Structures Generated by the INVOKE Directive
(page 2 of 2)
Summary of Contents for NonStop SQL/MP
Page 4: ......
Page 14: ...Contents HP NonStop SQL MP Programming Manual for C 429847 008 x ...
Page 60: ...Host Variables HP NonStop SQL MP Programming Manual for C 429847 008 2 26 VARCHAR Data Type ...
Page 294: ...SQL MP Sample Database HP NonStop SQL MP Programming Manual for C 429847 008 A 6 ...