Page 1 of 1

Database and Datastage job

Posted: Sun Jan 18, 2004 9:14 pm
by cheerfu1
Hi all,
would like to ask whether it would be possible for a datastage job to abort with error even though the update in the database is successful?

The update stage of the table is the last stage in the datastage job whereby


oracle database(read) (reference)
|
sequential file -> Transformer - > oracle database (update)

Thanks for your kind attention :)

Posted: Sun Jan 18, 2004 9:26 pm
by vmcburney
Usually you have an array size and a transaction size setting for your database stage which controls how many rows are updated between each commit. If your job aborts it is possible for some updates to have taken place and been committed. If all your updates work successfully I think it highly unlikely that your job will abort unless you have an after-job routine running.

Posted: Sun Jan 18, 2004 9:44 pm
by cheerfu1
Thanks. :D
My job shall clear the table and insert only one row.
However i do have an after-job routine which only touches a file.

Anyway thanks for the reminder
vmcburney wrote:Usually you have an array size and a transaction size setting for your database stage which controls how many rows are updated between each commit. If your job aborts it is possible for some updates to have taken place and been committed. If all your updates work successfully I think it highly unlikely that your job will abort unless you have an after-job routine running.

Re: Database and Datastage job

Posted: Sun Jan 18, 2004 10:11 pm
by Teej
cheerfu1 wrote:would like to ask whether it would be possible for a datastage job to abort with error even though the update in the database is successful?
Yes. It is possible. But the events that cause it to abort would be fatal in any situations. I do not know of any specific situations where you can control an abort (I'm still weak on DataStage Server's knowledge.)

Does this answer your question? If not, please clarify with us what your goals are in this situation.

-T.J.

Posted: Sun Jan 18, 2004 10:48 pm
by vmcburney
To be perfectly safe you could split it into two and have a sequence job with a database job stage and move the after job routine to a routine stage. I never liked after job routines, always preferred to call them seperately from a controlling job. I think it's more maintainable that way.

Posted: Sun Jan 18, 2004 11:46 pm
by ray.wurlod
cheerfu1 wrote:Thanks. :D
My job shall clear the table and insert only one row.
However i do have an after-job routine which only touches a file.
If anything sets the ErrorCode argument of your after-job routine to a value other than zero your job will abort.
That is the documented purpose of the ErrorCode argument.

Posted: Tue Jan 20, 2004 10:37 am
by raju_chvr
I would like to pitch in one more idea about this. in your target ORACLE stage if you don't check box for 'Treat Errors as Non-fatal' you might get a non-fatal error for every hiccup you have in update. Usually this box is checked and the hiccups will be considered as Warnings by DataStage.

Just a thought !!!