Reset Data Stage 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
Das
Participant
Posts: 87
Joined: Tue Oct 24, 2006 9:58 pm
Location: india

Reset Data Stage Job:

Post by Das »

HI all,

hJob1 = DSAttachJob("ABC", DSJ.ERRFATAL)
LastRunStatus = DSGetJobInfo(hJob1, DSJ.JOBSTATUS)
If ( LastRunStatus = DSJS.RUNFAILED Or LastRunStatus = DSJS.STOPPED Or LastRunStatus = DSJS.CRASHED) Then
Call DSLogInfo("ABC", "Reseting job and last Run status")
ErrCode = DSRunJob(hJob1, DSJ.RUNRESET)
ErrCode = DSWaitForJob(hJob1)
ErrCode = DSDetachJob(hJob1)
hJob1 = DSAttachJob("ABC", DSJ.ERRFATAL)
End
The above code i have written for Resetting a Job which is aborted.Can u recoment any modifiactions.

I am using the same code in 4-5 places for different jobs,How can i Make it as a functin and reset the curresponding jobs.

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

Post by ray.wurlod »

Code: Select all

hJob = DSPrepareJob(hJob)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply