Indicator Variables in Param Statements
You can code param statements to accommodate data assigned to or from nullable columns and form fields. The syntax is analogous to that previously described, with the exception that, in the target string, type indicators are needed in place of both the data variable and the indicator variable. Since indicator variables are always 2-byte integers, you can use the i2 type indicator for this purpose. A sample target list of a param retrieve statement, including indicator variables, might look like this:
tlist = '%c:%i2=e.empname, %f8:%i2=e.salary'
The var_address_array corresponding to this target list needs four cells, initialized in the following order:
a character-variable address
an address of an integer*2
an address of a real*8
an address of another integer*2
When the retrieve statement executes, one or both of the short variables can contain the value -1 if null data were present in that row of the table.
Last modified date: 04/03/2024