I have a Job JobA which is in aborted status.
I am having a controller job JobB where I am trying to attach JobA to reset it and run using
hJob1 = DSAttachJob("JobA", DSJ.ERRFATAL)
But it is throwing me exception that the job is not in the run mode. Can anyonehelp whet need to be done? I want to run JobA from controler job no matter what it is in abort or not abort status.
DSAttachJob
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 238
- Joined: Fri Jul 25, 2008 8:55 am
Of course you can attach to an aborted job, and the code you posted does just that and nothing more. You'd need to take an extra step to reset an aborted job before attempting to run it and it sounds like you're not doing that.
As noted in other replies to you, you can use the DSPrepareJob function for that - it performs the "Reset if required" functionality. After that completes, then run the job like normal.
As noted in other replies to you, you can use the DSPrepareJob function for that - it performs the "Reset if required" functionality. After that completes, then run the job like normal.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers