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..
Reset Data Stage Job:
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.