15 pts.
 CL/QMQRY
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

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

…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

 108,055 pts.

 

WHY , QMQRY CAN’T GRAB RESULT FROM PROCEDURE, WHILE IT CAN GRAB RESULT SET FROM ‘SELECT STATMENT ‘

 15 pts.

 

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

 108,055 pts.