SQL Call Storeprocedure



IBM's flagship relational database management system

SQL Call Storeprocedure

Postby cobyman » Fri Jul 16, 2010 12:57 pm

Hi,

I try to make follwoing query

SET CURRENT SCHEMA = "XXXA0D";
CALL "PTRX_B01"('DC', 'LIKE', 'PTRX_B01', '?', '?', '?', '?', '?', '?', '?');

The Questionsmark are Outputparms. The Query does not work like this. I dont know how to set this query to run that Storeprocedure. If a STP has only Inoputparms, it works perfect.

How do I set the Parms for the Output so I can run that Query in Tool like Toad or other SQLTool connected to Db2?

Orig Query suggested by Toad:
CALL "JBBA0D"."PTRX_B01"(@I_CONFIG_FILTER_STRING, @I_OPERATOR, @I_PATH_OF_CALLED_COMP, @O_PATH_OF_CALLED_COMP, @O_SQLCODE, @O_SQLSTATE, @O_SQLERRM, @O_ROW_COUNT_PROCESSED, @O_ROW_COUNT_MSG, @O_RETURN);


Queries I run without success:
CALL "PTRX_B01"('DC', 'LIKE', 'PTRX_B01', '?', '?', '?', '?', '?', '?', '?'); -> Error
CALL "PTRX_B01"('DC', 'LIKE', 'PTRX_B01', @O_PATH_OF_CALLED_COMP, @O_SQLCODE, @O_SQLSTATE, @O_SQLERRM, @O_ROW_COUNT_PROCESSED, @O_ROW_COUNT_MSG, @O_RETURN); -> Error

Thx for any Help
cobyman
 
Posts: 1
Joined: Wed Jul 14, 2010 3:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SQL Call Storeprocedure

 

Return to DB2