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.
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.