Is there a way to bring the row back and have a flag or indicator on an external data structure to handle the nulls?...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
I am currently creating individual work fields for the null indicators.
Also, are there any plans to allow the RPG Programs to receive a Cursor that was created in a Stored Procedure?
With nulls, you can still fetch into a data structure. Simply specify the data structure followed by another data structure (array) that will hold the values of the null indicators. Define same number of elements in this array as there are fields in the data structure -- in the case of the example below, this is 12.
* CustomerRow -- an externally described data structure based on SQL view allCusts
d customerRow e ds extname(allCusts) qualified
* Null indicator arrays
d customerNIArr s 5i 0 dim(12)
FETCH custListCursor INTO :customerRow :customerNIArr;
Related Q&A from Kent Milligan
To solve the SQL error -321 on IBM i6.1, use the new values statement to overcome the error. If you are using an older release, declare a cursor ...continue reading
When working with DB2 files with columns that have both short and long names, there is no option choose which column names are returned via ODBC ...continue reading
Create a host variable of the where in statement on the fly with dynamic SQL.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.