Figure 15-5
This illustration describes a bind descriptor after assigning values. The "n" variable is reset by the program to "1", as the maximum number of select-list items or placeholders found by DESCRIBE (this number is equal to the number in the "f" variable). The "v" variable points to addresses of data buffers that store select-list or bind-variable values. In this case, the value of "6-2-5-\0", as entered by the user, is contained in the data buffer at v sub-zero. The "l" variable contains the index of the last element of the "v" variable. In this case l sub-zero is "3". The value of t sub-zero in the "t" variable is reset to "1", to correspond to the datatype of the data in v sub-zero of the "v" variable. i sub-zero of the "i" variable is set to "0" to indicate that the indicate that the indicator-variable value to which i sub-zero points is not null. The "f" variable contains the number of select-list items or placeholders found by DESCRIBE. s sub-zero in the "s" variable now contains the name "B-O-N-U-S", as it was entered by the user. Therefore, the "f" variable contains the number "1". 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 by DESCRIBE to "5", "0", "0", respectively, as the first pointer of the "s" variable points to a name that is 5 characters long, and the other two pointers point to names that have no characters, as yet. The "x" variable contains three pointers that point to addresses for indicator names of length of four characters that have no characters, as yet. The "y" variable contains the maximum length of the names pointed to by the "x" variable, which is "4". The "z" variable is set by DESCRIBE and contains the number of characters in each indicator-variable name, which is "0", as the names in the "x" variable contain no characters, as yet.