Is there an easy way to access the results of a call to a stored procedure from the "green screen" side? What I want to do is to be get the result set of a stored procedure and populate a table with the data ... generically. I'd like to do this from batch.
I already have several utilities that allow me to do similar tasks, such as accept a SQL statement and direct the results to a table. I just can't seem to find a way to do this with SPs. My research seems to be leading me towards CLI. Is that where I need to look?
None of the green screen SQL interfaces support a stored procedure call that returns a result set. SQL CLI does have the support to process a result set and the result set data can be easily inserted into a table. The SQL CLI calls can be embedded into C, RPG, & COBOL programs that can easily be called from green screen batch process.
MORE INFORMATION ON THIS TOPIC
Search400.com's targeted search engine: Get relevant information on DB2/400.
The Best Web Links: tips, tutorials and more.
Check out this online event, Getting the Most out of SQL & DB2 UDB for the iSeries.
Dig Deeper on iSeries SQL commands and statements
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
When developing tables in a parent-child relationship, use a primary key and a foreign key along with a unique ID to make your database easier to ... Continue Reading