Figure 15-8
This illustration describes a select descriptor after the FETCH. The "n" variable is set to "3", to correspond to the maximum number of items that can be DESCRIBEd. The "v" variable points to an array of addresses of data buffers that store select-list values. The values for v sub-zero, v sub-one, and v sub-two are returned as follows: "M-A-R-T-I-N-\0", "7-6-5-4-\0", and "4-8-2-.-5-0-\0", respectively. 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 all set to "5", 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, and i sub-zero through i sub-two are set to "0", indicating that the select-list values are not 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". 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.