This topic has been locked.
1 reply Latest Post - 2012-07-27T18:48:08Z by efra9999
Pinned topic Native SQL procedure not returning full result set (running DB2 version 9)
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
We've created a couple of Native Stored procedures that we then use Progress Software (Data direct - Shadow) to create a web service for so that it can be exposed to some open source applications. It gets defined OK in DB2 and is usable with the shadow product. However, I'm trying to also call that same stored procedure with a Cobol program and it only returns the input field used in the stored procedure call rather than the entire result set from the cursor in the stored procedure. If I change the stored procedure to do a select into rather than a cursor with return and then declare some fields to be passed back to the calling cobol program it works using the cobol program. However, for some reason the select into definition doesn't work with the Shadow product. It thinks all the fields are input fields and halts me from creating the web service in Shadow (I've tried defining the stored procedure fields as in, inout, and output when appropriate and none of those combinations seems to work in Shadow). Since I don't have much flexibility to delve into why Shadow doesn't work I really wanted to have the version with the cursor with return work with the calling cobol program. I'm attaching the stored procedure versions and cobol calling program for reference. Thanks..
Updated on 2012-07-27T18:48:08Z at 2012-07-27T18:48:08Z by efra9999
efra9999 270005AH8K11 PostsACCEPTED ANSWER
Re: Native SQL procedure not returning full result set (running DB2 version 9)2012-07-27T18:48:08Z in response to efra9999I regretfully bow my head in shame. Everything is set up just fine for the cobol program to get the proper results set back. I coded my fetch where I had 2 column names in reverse order. Once I swapped the column names, things worked fine. I hoping that I at least was able to provide some comedy for some folks who read this post. Thanks to anyone who thought about helping.