Command to reset Aborted job

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

Post Reply
SHARAD123
Premium Member
Premium Member
Posts: 54
Joined: Wed Jan 09, 2008 12:05 am

Command to reset Aborted job

Post by SHARAD123 »

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 »

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
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

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
Premium Member
Posts: 54
Joined: Wed Jan 09, 2008 12:05 am

Post by SHARAD123 »

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 »

Gosh, and here's me thinking the original question was "is there a command equivalent".
:roll:
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
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Command, not command line. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply