I'm am working on my first RPG stored procedure thanks to Chris Ringer :-) and I have a situation where I want to check for a couple of conditions before allowing the cursor to open and return the result set. Well, if those conditions aren't met I want to bypass the processing.
Since I'm passing the return of the result set I'm getting an SQLSTATE of 38501, stating that there was a problem with the program.
Is there a way of handling this? Thanks for any input.