Page 1 of 1

Basic command to capture if insertion is sucessful

Posted: Mon Mar 28, 2005 11:36 pm
by suma
What is the Basic command that will capture if a row is inserted sucessfully or not.
In my case whenever i find any new data i have to insert into my target at the same time i have to run three jobs simultaneously.

I have writtern a routine that is used to run the Job. But i want to run the job only if the insertion is sucessful.Do we have any commands that captures how many rows are inserted sucesssfully.

SumA

Posted: Tue Mar 29, 2005 12:33 am
by davidnemirovsky
Datastage has the capacity to accomplish your desired result but you have to take a different approach.

Any database statement if successful will not return anything in the LOG otherwise the log would always be full of 'successful entries'. On the other hand, if a statement has not successfully completed (ie Database error) there will of course be a WARNING in the log for that job.

Your process needs to read the log of a certain job and check for any warnings. If there are INSERT warnings they will appear in the job log and you can use this to control the execution of the subsequent jobs.

You can also grab the log entry that specifies how many rows were written.

There are a few ways to retrieve JOB INFO (hint! :lol: ) and the log may not be the most effiecient way. You might want to run an After Job Subroutine ExecTCL statement that might pipe rows written into a flat file.

Posted: Tue Mar 29, 2005 4:41 pm
by roy
Hi,
in a transformer you can put a reject link or thest the REJECTED variable or test for the RDBMS return code in some cases.

a search will pop up all the info you need it was covered before.

IHTH,