Figure 15-7
This illustration describes a select descriptor before the FETCH. The "n" variable is set to "3", to correspond to the number of items found in the query select-list, as set in the "f" variable. The "v" variable points to an array of addresses of data buffers that store select-list values. The "l" variable contains the number lengths for the values of the "v" variable. In this case, l sub-zero is set to "10", l sub-one is set to "6", and l sub-two is set to "9". The values of t sub-zero, t sub-one, and t sub-two in the "t" variable are set to "5", "2", and "2", respectively, to correspond to the datatype of the data in v sub-zero, v sub-one, and v sub-two of the "v" variable. The "i" variable is defined, but has no value, yet, indicating that the select-list value is null. The "f" variable contains the number of select-list items or placeholders. In this case, the value of the "f" variable is "3", as three items were found in the query select list: s sub-zero in the "s" variable contains the name "E-N-A-M-E", s sub-one contains the name "E-M-P-N-O", and s sub-two contains the name "C-O-M-M", as it was entered by the user. m sub-zero through m sub-two of the "m" variable are set to "5". The "c" variable contains pointers to arrays of current lengths of select-list or placeholder names. In this case, c sub-zero, c sub-one, and c sub-two are set to "5", "5", and "4", respectively, as the first and second pointers of the "s" variable point to names that are five characters long, and the last pointer points to a name that is four characters long.