How to make this condition in Job Sequence Restartability

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

How to make this condition in Job Sequence Restartability

Post by pradkumar »

Hi Everyone,

I have a job that releases several jobs to run concurrently . In those 2 jobs failed one with an abort and other has warning messages. But in my sequence i do not proceed to next step .Next step is on OK,the alternate link is "otherwise". On re-start of the job , excecution started from the 1st job which is OK, but i wanted 2nd job to restart also and it didn't.

I did not check the box "Do not check point run" because I don't want it to re-run even if it successfully finishes, only when it "fails" with warning.

Can anyone help me to overcome this problem and what approach have to follow for this ..

Thanks in Advance
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Your Sequence job must abort and be in an Aborted/Restartable status in order for the checkpoints to work... was it?
-craig

"You can never have too many knives" -- Logan Nine Fingers
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

yes the sequence job is in aborted/restartable status.Is it possible to set a condition the job should restart if it has warining/abort?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Oh, so the issue is the one that ended with warnings does not rerun? Your jobs need to Abort as well, so you'll need to ensure it aborts as well whenever there are any warnings in it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

yes Chulett.. I need to abort the job when ever it has got warnings. Can you please tell me how to do this in job level or sequencer level.

Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sequence level would be too late, so you need to handle it "in job". Several ways, some off the top of my head...

Set the warning level when the job runs very low. Send problems down a reject link set to abort on the first record. Check the JOBINTERIMSTATUS after job and abort the job if is says it's going to finish with warnings.

Probably others.
-craig

"You can never have too many knives" -- Logan Nine Fingers
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

Thanks for your answers. I will try to use to those conditions and let you know.
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

Hi,

Can i use the terminator activity stage in the job sequence and the trigger option would be DSJ.JOBSTATUS = DSJS.RUNWARN.?

Can i use this option ..Please let me know
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No, anything at that level would be too late. That would abort the Sequence itself and possibly any currently running jobs as well, not the one that ended with warnings.
-craig

"You can never have too many knives" -- Logan Nine Fingers
parag.s.27
Participant
Posts: 221
Joined: Fri Feb 17, 2006 3:38 am
Location: India
Contact:

Post by parag.s.27 »

chulett wrote:No, anything at that level would be too late. That would abort the Sequence itself and possibly any currently running jobs as well, not the one that ended with warnings. ...
We also had same problem and we resolved it.

Write an After Stage Subroutine and in that routine check for job status using DSJ functions. If the status is not equal to one then issue a fatal signal as DSLogFatal(<any message>,<name of routine>)

and the job will abort after throwing your custom message
Thanks & Regards
Parag Saundattikar
Certified for Infosphere DataStage v8.0
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

Hi Parag,

Can you help me how to write or give an idea for after job subroutine to solve this issue.. Because iam new for the routines .I need to write parallel routine right?





Thanks in Advance
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not true. Before/after subroutines are written as server routines whose type is "before/after subroutines", even when they are deployed into parallel jobs. This works because before/after subroutines only ever have to execute on the conductor node, and (typically) the conductor node is where the DataStage run machine is installed.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DSXchange Learning Center has a DVD available on programming with the DataStage BASIC language. Or you can take a class
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

Thanks Ray for you answers. I will be writing the routine and i will let you know if i have any questions.
Post Reply