Hi all,
I am having 5 jobs in the sequence,I want all the 5 jobs to run first
and for the second time,I want to skip the second job,its working well for the first time with execution action reset only and for the consecutive run it gives a fatal error.Is there any option to do this.
Error calling DSRunJob(job2_09L2), code=-2 [Job is not in the right state (compiled and not running)]
With Regards,
Sundar.
Error in Sequence
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
In your job activities, specify "reset if required, then run" as the run mode. Skipping is managed via the compilation options in the job properties window of the job sequence itself; the check box names are quite self-explanatory, and there's always Help.
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.
HI,
If you intend to run the second job for very first time and not from second run onwards, then you can built your own logic to acheive. Use WaitForFile activity after Job1 and trigger if after the first job finish ok.
In WaitForFile stage, just check for some indicator file say 'Indicator.txt'.
Create two output link from WaitForFile stage. Introduce the Job2 to one of the link where the trigger type is Failed.
Another link with the trigger type as OK. This link and and output of the Job2 link connected to a Sequencer with the mode of Any.
After the first run you can just touch the indicator file either by Execude command Activity or by AfterJobSubroutine.
So that from second run, the waitforfile activity after sensing the file will trigger directly to sequencer and skip the Job2.
-Kumar
If you intend to run the second job for very first time and not from second run onwards, then you can built your own logic to acheive. Use WaitForFile activity after Job1 and trigger if after the first job finish ok.
In WaitForFile stage, just check for some indicator file say 'Indicator.txt'.
Create two output link from WaitForFile stage. Introduce the Job2 to one of the link where the trigger type is Failed.
Another link with the trigger type as OK. This link and and output of the Job2 link connected to a Sequencer with the mode of Any.
After the first run you can just touch the indicator file either by Execude command Activity or by AfterJobSubroutine.
So that from second run, the waitforfile activity after sensing the file will trigger directly to sequencer and skip the Job2.
-Kumar