Seq 1:
------ Job Termination ( Failure)
|
Job Activity ---
|
------ Setting User Status as 0 using routine.
Seq 2:
Job activity has seq1 as the job.
------ Setting User Status as 0 using routine
|
Job Activity ---
|
------ Setting User Status as 1007 using routine.
The constraint for Success link is Userstatus =0 and failure link is Otherwise.
Seq2 is the master sequence calling Seq1. When the job in Seq 1 fails, it triggers Job Termination activity. This causes the master seq to fail with user status as 1007. Once the error is rectified and restarted, the first job completes successfully but the master seq still returns userstatus as 1007 instead of 0.
Can you please clarify on where i'm making mistake. This is simple prototype of our job. We're facing similar issue in one of our big job.
Thanks,
Firvin
Last edited by visvacfirvin on Tue Jan 12, 2010 5:10 pm, edited 1 time in total.
Your code says that Seq 2 is the master sequence which internally triggers Seq 1. So Seq 2 is the master sequence. But your explanation tells that Seq 1 is the master sequence. Anyways, that should not stop us from assisting you. Can you enable "Do not Checkpoint" for the routine stage and try again?
Kandy
_________________
Try and Try again…You will succeed atlast!!
That seems a little... over-engineered to me. Why all the extra user status shenanigans? You should be able to do this using 'regular' job status checks.
-craig
"You can never have too many knives" -- Logan Nine Fingers
Thanks kandyshandy. Yea Seq 2 is the master seq. updated the post.
@Chulet, for handshake between different technologies like Java/SAS/Unix scripts we had to define our custom error codes. Is there anything wrong with the design or datastage is supposed to work like this?
Not quite sure what 'work like this' means. Are you certain that your triggers are firing like you think they should? Meaning, in Seq2 whether or not Seq1 finishes correctly it sounds like it may always be taking the Otherwise link. Have you added any 'logging text' to each stage to know which path it actually takes? Are you confident that your user status routine works correctly in all circumstances?
-craig
"You can never have too many knives" -- Logan Nine Fingers
Chulett, I actually meant if the UserStatus will never get reset in case of checkpointed sequence. I guess similar question was asked once and you adviced to use jobstatus instead of userstatus.
Recompiling a job 'resets' it, otherwise it retains the value last put there until another takes its place. And you didn't really answer or respond to any of my questions.
-craig
"You can never have too many knives" -- Logan Nine Fingers
So, can you check whether the routine successfully updates the user status? Even after enabling "Don't check point" for routine stage, if it does not update the user status, i doubt the routine.
Check in the log to see whether the routine gets executed after Seq1 completes successfully.
Kandy
_________________
Try and Try again…You will succeed atlast!!