How to Trap Oracle Error fileldwise per Record

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
ArijitS
Participant
Posts: 24
Joined: Sat Jun 02, 2007 8:58 am
Location: Kolkata

How to Trap Oracle Error fileldwise per Record

Post by ArijitS »

[size=12][/size]
I have a record having comma seperated coloumns.There are total 50 coloumns.I want to check the error of the filed label incase of business logic and Oracle-table insertion error.Incase of business logic it is ok.But incase of Oracle-error while we are implementing with DSLinkLastErr.But there it only traps the first occurence for Oracle Error.
krishobby
Participant
Posts: 20
Joined: Sun Dec 04, 2005 3:23 pm

Re: How to Trap Oracle Error fileldwise per Record

Post by krishobby »

You can have a reject link to the Oracle Enterprise Stage while using UPSERT operation which will allow you to refer the SQLSTATE and SQLCODE in the reject output.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That would be a PX answer not applicable to a Server job, please keep an eye on the forum you are in and to the Job Type.

No can do. Oracle will only report one error at a time even if you have a multiple problems. That's just the way it works. Unless I've misunderstood what you meant by 'first occurrence', in which case have another go at explaining your problem.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArijitS
Participant
Posts: 24
Joined: Sat Jun 02, 2007 8:58 am
Location: Kolkata

Post by ArijitS »

[quote="chulett"]That would be a PX answer not applicable to a Server job, please keep an eye on the forum you are in and to the Job Type.

No can do. Oracle will only report [b]one error at a time[/b] even if you have a multiple problems. That's just the way it works. Unless I've misunderstood what you meant by 'first occurrence', in which case have another go at explaining your problem.[/quote]

By "first occurence" i mean suppose in a record of 50 coloumn there are errors in 10th,12th,45th field then Datastage server can only trap the the first occurence ie 10th coloumns error not the 12th,45th at that time.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That's correct. The first. Absolutely the first. Oracle reports the first error and stops. You fix the first, Oracle will then report the next, and stop. And so on.

Most database servers, and most application development tools (possibly except compilers) behave in this fashion.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So, no misunderstanding at all. As noted, only one Oracle error will be reported at a time. You fix it and then the next will be raised. Lather, rinse, repeat. This is not a 'DataStage server' behaviour, it is a standard database behaviour.
-craig

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