Page 1 of 1

Exception Handling

Posted: Thu Sep 25, 2008 9:08 am
by senthilmp
Hi,

I am trying to design a job such that if an exception occurs it should write to a file or table

i.e Out of 4 rows from source 2 rows have Varchar2(15) and other 2 rows have Varchar2(12), and the target has a structure of Varchar2(12).
When job runs it throws the warning saying inserted value too large. Now i want the other two rows to be inserted into table and the bad record (ie of length varchar2(15)) should be written to a file or table.

To be simple i have to do an Exception Handling like in Stored Procedure

Posted: Thu Sep 25, 2008 9:27 am
by chulett
Setup a 'reject link'. Open the online Help and on the Index tab type 'reject rows' for a lengthy discussion on the topic.

Posted: Thu Sep 25, 2008 9:59 am
by csri
Setup a new link from the transformaer and set it as 'Reject row'.
To catch rows which have failed to be written to an output link, set the Constraint field to OutputLink.REJECTEDCODE

This should resolve.

Posted: Fri Sep 26, 2008 2:26 am
by ray.wurlod
You can test the mapping with an Oconv() function. Create a routine that applies the Iconv() function to its argument with "NLSmapname" as the second parameter to Oconv() then test whether the conversion was successful using the Status() function.

Obviously you need to replace "mapname" in the above with the name of an actual NLS map.