Unanswered: COBOL Stored Procedure Returning Result Set
I am trying to write a COBOL stored procedure to be shared by a VB client and a mainframe process. The stored procedure will be executed on Z/os and is not a simple SQL stored procedure. It will call other modules and try to return a result set since I am not sure how much information will be returned. The problem is that CURSOR to be returned is not solely composed of SELECTS from a table. I need to construct columns from multiple programs and tables. Do I need temporary tables to get this to work? We are trying to reuse code that works fine and a SQL-only solution would be a performance nightmare and tough to code.
I found some code that creates a global temporary table and this appears to work fine in the development environment. My initial worry was that I would not be able to create this type of table without the help of the DBA. Our DBA is tough to work with so I avoid him until I have everything worked out and I always try to minimize the work that I request.