Override Default Data Types In The SQL Descriptor
August 21, 2013 Hey, Mike
Note: The code accompanying this article is available for download here. I’d like to use SQL Descriptors in an embedded SQL program to read column data into host variables. However, if my host variable type doesn’t match exactly the parameter or column data type then I receive an SQL0076 error: “DATA or INDICATOR item not correct.” How can I, for example, receive the data from a CHAR(10) column from the SQL descriptor into an RPG varying-length character 20 variable, without using an explicit CAST in the SQL statement? –J.B. AUTHOR’S NOTE: If you’re unfamiliar with SQL descriptors, please see |