HTTP_GET is a Table Function and have to be specified within the FROM Clause in a SELECT Statement.
A SELECT Statement can only return a single table/result set.
So if you need to return multiple Result Sets, you have to code multiple Cursors, one for each HTTP_GET API you want to access.
How ever I'd suggest to ask yourself if you really need multiple result sets or if it would not possible to join the (decomposed) results in a single statement (may be with multiple CTEs) and then return this single statement.
On the other side I'd also check, also for the solution you already have, if it would not be better to create a UDTF instead of a stored procedure (returning a result set)
Birgitta
------------------------------
Birgitta Hauser
Database and Software Engineer
Selfemployed - Modernization-Education-Consulting on IBM i
Kaufering
+49 170 5269964
------------------------------