I can run the stored procedure in Toad/Oracle using the
following code.
DECLARE
O_ERROR_CODE VARCHAR2(100);
O_ERROR_MESSAGE VARCHAR2(100);
BEGIN
Q179313.TR_TEST_SP_OUTPUT(SYSDATE, O_ERROR_CODE, O_ERROR_MESSAGE);
DBMS_OUTPUT.PUT_LINE(O_ERROR_CODE);
DBMS_OUTPUT.PUT_LINE(O_ERROR_MESSAGE);
END;
This is the DBMS OUTPUT in Toad:
1) 01
2) 123 owned prices are updated. 456 ticket
prices are updated.
I use this same code in a UC4 Variable SQL Statement (minus the DBMS_OUTPUT lines.) I've also created a Unix type job using GET_VAR using this code:
:DEFINE &OUT2213#, string
:SET &OUT2213# = GET_VAR('NAME_OF_MY_VARIABLE_OBJECT', O_ERROR_MESSAGE)
:SET &out# = SEND_MAIL('myfirstname.mylastname@xyz.com',,'TEST SUBJECT', &OUT2213#)
The email is sent with the subject, but nothing in the email body.
I need to capture the O_ERROR_MESSAGE output parameter value in
UC4, embed it into the email body (if possible) to send nightly to a distro
group.
This is my first time using UC4, and this is as far as I've gotten with it. I'm new to Unix type jobs as well, so I am not familiar with STDOUT.
Thanks again for your help.
Tracey