Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
value = %SSC_INDICATOR(dbchannel, dbcursor, int_array, [ncount][, vars])
This function returns SSQL_NORMAL (success). (i)
An internal database channel previously initialized using %SSC_INIT and connected by %SSC_CONNECT. (n)
The logical cursor number within the range from 1 through the maximum number specified by maxcur during %SSC_INIT. The cursor must have been opened by %SSC_OPEN. (n)
A real array whose elements will be filled with SQL indicator variables. (n)
(optional) The row of a multirow operation whose status you want returned. Default is 1. (n)
(optional) The number of vars moved, up to a maximum of int_array elements. (a or n)
The value for each element in int_array relays the status of either the defined variables in the output order specified by %SSC_DEFINE or %SSC_STRDEF, or the defined variables in the output and in/out order specified by %SSC_EXECIO.
Possible returned values for each element in int_array:
– 1 = The column is null (or no data was moved in the last statement).
0 = The column was moved successfully.
> 0 = The data was truncated, and the non‑truncated size is reported.
The following is an example of retrieving the status of two SELECT columns, deptnum and deptname. In particular, this example reports the status of moving deptnum into the host variable and whether deptname was returned as a null or the data was truncated.
sqlp = "SELECT deptnum, deptname FROM org WHERE deptnum = 1" if (ssc_open(dbchn, cur2, sqlp, SSQL_SELECT, SSQL_STANDARD)) goto error_exit if (ssc_define(dbchn, cur2, 2, deptnum, deptname)) goto error_exit if (ssc_move(dbchn, cur2, 1)) goto error_exit if (ssc_indicator(dbchn, cur2, intarray)) goto error_exit writes(15, "status of deptnum is"+%string(intarray)) writes(15, "status of deptname is"+%string(intarray))