i hav code
STRQMQRY QMQRY(SQLPROC) OUTPUT(*OUTFILE) + OUTFILE(QTEMP/SQLDT)
In SQLProc txt file i am callin a sql procedure , developed using i series navigator and return data set using cursor. i want this cursor output in qtemp/sqldt file.
in sqlproc if i mentioned SELECT statment , then it will work fine, but i want through procedure
its urgent , plz help
Software/Hardware used:
ASKED:
June 5, 2012 12:16 PM
UPDATED:
June 7, 2012 6:48 AM
…but i want through procedure
Then write a program using a language that can receive a result set from a procedure. Don’t use CL. CL can not receive result sets.
(Technically, at V5R4 and later, you can probably call a stored procedure and possibly access a returned result set. You might do it by calling the appropriate SQL Call Level Interface (CLI) APIs, but it would be easier to use a different language. CL is intended to be a control language rather than a general purpose programming language.)
Tom
WHY , QMQRY CAN’T GRAB RESULT FROM PROCEDURE, WHILE IT CAN GRAB RESULT SET FROM ‘SELECT STATMENT ‘
WHY , QMQRY CAN’T GRAB RESULT FROM PROCEDURE
CL can’t grab a result set.
It doesn’t matter if a QMQRY can or can’t. As long as CL can’t do it, there is no point in tring to use a QMQRY to return a result set to CL.
Tom