Reject handling sybase

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
josy
Participant
Posts: 14
Joined: Wed Oct 29, 2003 5:44 am

Reject handling sybase

Post by josy »

Hi All,

I am trying to design a job to trap my database rejected records like that :

SourceStage----readlink---->TransformerStage-----insertlink----->TargetR
SourceStage----readlink---->TransformerStage-----insertlink----->DBMS
rejectlink
SeqFileStage

So, I have checked the box "Reject Row" for the link to the reject file.
The job does reject the records into the flat file but it also generates a warning for every rejected records!!! Then, after 50 warnings, it aborts.

Is there any way to avoid all these warnings??
I was expected to get only one warning indicating that N rows have been rejected.

Thanks

Josy
tonystark622
Premium Member
Premium Member
Posts: 483
Joined: Thu Jun 12, 2003 4:47 pm
Location: St. Louis, Missouri USA

Post by tonystark622 »

Josy,

In the constraint, instead of marking the row as the reject row, you could do something like this:

DSLink4.DBMSCODE <> 0

You can find DBMSCODE by right clicking in the constraint menu, pick Link Variables, then Outputs, click on the plus sign next to the link name and you'll see DBMSCODE.

Good Luck,
Tony
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Reject handling sybase

Post by chulett »

josy wrote:Is there any way to avoid all these warnings??
I was expected to get only one warning indicating that N rows have been rejected.
No. Your Target stage is generating the error messages and it will do so regardless of the presence of a Reject Row. All the Reject Row does is allow you to capture the rejected data and (as a special added bonus!) automatically logs the number of rejected rows.
-craig

"You can never have too many knives" -- Logan Nine Fingers
tonystark622
Premium Member
Premium Member
Posts: 483
Joined: Thu Jun 12, 2003 4:47 pm
Location: St. Louis, Missouri USA

Post by tonystark622 »

Isn't than an Adventure quote in your sig, Craig? Haven't seen one of those for a while? :)

Tony
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ding! Ding! Ding!

Yes, it is - hand that man a Kewpie Doll! :lol: And don't forget to say 'xyzzy' every now and then just to confuse people...
-craig

"You can never have too many knives" -- Logan Nine Fingers
josy
Participant
Posts: 14
Joined: Wed Oct 29, 2003 5:44 am

Re: Reject handling sybase

Post by josy »

chulett wrote:
josy wrote:Is there any way to avoid all these warnings??
I was expected to get only one warning indicating that N rows have been rejected.
No. Your Target stage is generating the error messages and it will do so regardless of the presence of a Reject Row. All the Reject Row does is allow you to capture the rejected data and (as a special added bonus!) automatically logs the number of rejected rows.
Thanks for your reply.
But is there any way that the job rejects the records in the "Reject link" without generating warnings for every single row rejected?

Regards

Josy
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Josy - That was basically the question I was answering and, unfortunately, the answer is still no. :cry: Your target stage is the one generating and logging the warnings. This will happen with or without a Reject link.

Not to be facetious, but the only thing you can do is everything in your power to ensure your data will not cause errors before sending them off to the database - making sure required fields are not null, you are not creating duplicate records, etc. Because when they do create problems, those problems will be logged.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply