How to capture return values from Database?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
abby
Participant
Posts: 13
Joined: Fri Dec 30, 2005 1:00 am

How to capture return values from Database?

Post by abby »

Hi All,

I'm observing a strange problem to handle the return value from one of the insert triggers.

I'm trying to insert some records in a table with key column having auto-incremented Id value. So, for each insert the insert trigger returns the next Id value which I'm not aware how to capture in the DataStage job.

Currently, the job creates a warning on the director but the same number of records do get inserted in the required table.

At the same time, I can't modify the trigger definition since the same has been referenced at many places in my VB code as well.

Please advise me as to how to capture the return value from the insert trigger in my DataStage job.

Regards - Abby.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Abby,

what stage are you using to write to which database and what is the warning message you are getting?
abby
Participant
Posts: 13
Joined: Fri Dec 30, 2005 1:00 am

Post by abby »

ArndW wrote:Abby,

what stage are you using to write to which database and what is teh warning message you are getting?
I am using SybaseOC stage for database insertion into the Sybase Database and the warning message looks like :
"Sybase Server message 0 (severity 10) from stored procedure 'ti_counties', line 29: 275"

Here, the trigger 'ti_counties' is returning the next Id value i.e 275, which I am unable to capture in any way. Also, the line no. 29 in the warning message refers to the return statement in the trigger where it throws back the value to the calling module.

Hope, this helps to understand the problem to some more extent.[/quote]
Post Reply