Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.
Moderators: chulett , rschirm , roy
SHARAD123
Premium Member
Posts: 54 Joined: Wed Jan 09, 2008 12:05 am
Post
by SHARAD123 » Sun Aug 02, 2009 10:17 pm
Hi All,
Is there a command equivalent to the sequence trigger option "Reset if required then run"??
I tried using the DSJ.RUNRESET option in the DSRunJob function,but the job is reset even if the previous run is a success.
As an interim solution, the job status is captured and based on the status the job is either reset and run or run normal.
The search I made here was not helpful.
222102
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Sun Aug 02, 2009 10:20 pm
Code: Select all
dsjob -jobinfo projectname jobname
Parse the output to determine the status of the job and whether a reset is necessary. If it is:
Code: Select all
dsjob -run -mode RESET -jobstatus projectname jobname
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Mon Aug 03, 2009 6:29 am
From the command line, you need to continue to do what you are doing - a conditional check. From 'inside' DataStage you can use DSPrepareJob() to do the 'Reset if required' step, the run part is always a separate step.
-craig
"You can never have too many knives" -- Logan Nine Fingers
SHARAD123
Premium Member
Posts: 54 Joined: Wed Jan 09, 2008 12:05 am
Post
by SHARAD123 » Tue Aug 04, 2009 5:21 am
Thanks Craig.
The DSPrepareJob function did work as it was required
Thanks again
222102
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Tue Aug 04, 2009 5:08 pm
Gosh, and here's me thinking the original question was "is there a command equivalent".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Tue Aug 04, 2009 8:20 pm
Command, not command line.
-craig
"You can never have too many knives" -- Logan Nine Fingers