Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stored procedure + unix + OUT argument

Status
Not open for further replies.

saltbits

Programmer
Jun 1, 2004
27
US
I have a procedure that looks like this:

CREATE PROCEDURE DAY0_PROC (OUT v_ts TIMESTAMP)
LANGUAGE SQL
P1: BEGIN
..
--v_ts receives some value here
END P1

I have a unix shell script that calls it like this:
db2 "CALL DAY0_PROC(?)";

After this call, in the unix script, I want to capture the OUT value in a variable and echo it (and later write it to a file..). The code as it is, displays a long show of:
Value of output parameters
--------------------------
Parameter Name : V_TS
Parameter Value : 2004-07-14-16.21.26.715864
Return Status = 0

I have tried passing '$variable' and 'variable' in the call - doesnt work. What should I be doing?? Somehow, IBM documentation describes at length the use with C/Java etc. but not with Unix....

I would like for a way to capture the OUT value rather than 'grep' the output from the call itself, if thats possible.

Thanks for any help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top