Page 1 of 1

How to capture the warnings

Posted: Tue Sep 12, 2006 4:32 am
by Xpert
Hi,

I want to capture the warning messages and i have to load it in a table. if the warning is because of truncation errors, unique constraint, whatever it is? How to capture those warnings?

Posted: Tue Sep 12, 2006 5:06 am
by pankajg
I think you can do this by using DSGetLogSummary

U wil need to write a routine and use the function DSGetLogSummary, the result of which you can store or write to a file and then load that file into the database.

Check out the BASIC guide for more information on DSGetLogSummary.

Posted: Tue Sep 12, 2006 10:07 pm
by Xpert
Hi,

I tried with DSGetLogSummary function, but its giving newest log only. but i want to capture all the warnings. Thanks in Advance.

pankajg wrote:I think you can do this by using DSGetLogSummary

U wil need to write a routine and use the function DSGetLogSummary, the result of which you can store or write to a file and then load that file into the database.

Check out the BASIC guide for more information on DSGetLogSummary.

Posted: Tue Sep 12, 2006 10:29 pm
by kumar_s
You can capture the database errors like SQL CODE and SQL ERROR from the job by extendending the reject link with these column enabled using RPC.
If you need to load the logs available from datastage, you can use dsjob -logsum/-logdetail/-lognewest functionality.

Posted: Wed Sep 13, 2006 1:08 am
by ray.wurlod
Depending on what stage type you are using, and how you are sending the rows to the table (upsert vs write), there may be an additional column called sqlcode on the reject link.

However, capture of all warnings is probably easiest done by post-processing the job log.