Sequence job in loop getting aborted
Moderators: chulett, rschirm, roy
Sequence job in loop getting aborted
Hi All
I am working with a job which should run in a loop for a particular time frame. Its running in loop. But when the end time exceeds the given time limit, the job gets aborted. Actually i want the job in finished ok state.
The warning before the fatal error which i got is
"JOB_JS..JobControl (@Job_Activity_65): Controller problem: Error calling DSRunJob(JS_Job2), code=-14
[Timed out while waiting for an event]"
The design which i have used is
Uservariable_Activity--------->Startloop_activity---->Job_Activity--------->Endloop_Activity
In the Uservariable_Activity stage, I used 3 variables
1.StartTime
2.EndTime
3.Counter
In the startloop_activity stage these variables were called
Somebody please give me a solution for this or help me with an alternate design for my requirement
Thanks in advance
I am working with a job which should run in a loop for a particular time frame. Its running in loop. But when the end time exceeds the given time limit, the job gets aborted. Actually i want the job in finished ok state.
The warning before the fatal error which i got is
"JOB_JS..JobControl (@Job_Activity_65): Controller problem: Error calling DSRunJob(JS_Job2), code=-14
[Timed out while waiting for an event]"
The design which i have used is
Uservariable_Activity--------->Startloop_activity---->Job_Activity--------->Endloop_Activity
In the Uservariable_Activity stage, I used 3 variables
1.StartTime
2.EndTime
3.Counter
In the startloop_activity stage these variables were called
Somebody please give me a solution for this or help me with an alternate design for my requirement
Thanks in advance
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Timeout waiting for a job to start may be (usually is) a symptom that something in the execution environment is overloaded - either processing capacity or network capacity are the usual suspects.
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.
For a decidedly bare-bones design, there's nothing wrong with it. It runs the job in a loop until the end condition for the loop is met. Now, unless that's a new feature of 8.x I don't see how the loop stages understand your 'Time' based user variables. Are they in internal format? Are they actually driving the loop?
I also don't see how the loop ending or 'exceeding the given time limit' would cause any kind of time out error. Is there more to the design, something after the End Loop stage? Is 'JS_Job2' in fact the job being run by the Job Activity stage inside your loop?
As noted, the -14 timeout simply means the system was overloaded at the time the 'run job' was issued, such that the job could not start within the time limit hard-wired into the software. May have nothing to do with your loop, it could just be a victim of whatever else was running at the time.
![Confused :?](./images/smilies/icon_confused.gif)
I also don't see how the loop ending or 'exceeding the given time limit' would cause any kind of time out error. Is there more to the design, something after the End Loop stage? Is 'JS_Job2' in fact the job being run by the Job Activity stage inside your loop?
As noted, the -14 timeout simply means the system was overloaded at the time the 'run job' was issued, such that the job could not start within the time limit hard-wired into the software. May have nothing to do with your loop, it could just be a victim of whatever else was running at the time.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Hi
The value for the variables in the UserVariable_Activity stage given as follows
Starttime----->Iconv("11:42AM","MTS")
Endtime------>Iconv("11:45AM","MTS")
Counter------>1
These variables were called in the Startloop_Activity satge as follows
From------>Starttime
Steps----->Counter
To-------->Endtime
But the loop does not work inacordance with the time specification given.
Thanks
The value for the variables in the UserVariable_Activity stage given as follows
Starttime----->Iconv("11:42AM","MTS")
Endtime------>Iconv("11:45AM","MTS")
Counter------>1
These variables were called in the Startloop_Activity satge as follows
From------>Starttime
Steps----->Counter
To-------->Endtime
But the loop does not work inacordance with the time specification given.
Thanks
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Your increment is one second. Therefore, the second iteration of the loop will fail to start the job if it hasn't finished within that second. Further, if the first iteration of the job hasn't finished within one minute, it will throw a -14 error (or, possibly, abort with "job not in a runnable state - already running" error).
Try changing your increment to slightly more than the run time (in seconds) of the loop of activities.
Try changing your increment to slightly more than the run time (in seconds) of the loop of activities.
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.
I'm going to go out on a limb and disagree with Ray. The loop has no idea that you think you are working with 'time' values - they are just numbers. In fact, those IConv statements translate to this:
From: 42120
Steps: 1
To: 42300
So you've got the same thing as if you had interated from 1 to 180. It doesn't wait until 11:42AM to start and doesn't end at 11:45AM, it starts right away and runs your job 180 times, over and over and quickly as it can. The step of one equates to one loop, not one second after all.
Unless version 8.x has magically made those stages time aware somehow.![Confused :?](./images/smilies/icon_confused.gif)
From: 42120
Steps: 1
To: 42300
So you've got the same thing as if you had interated from 1 to 180. It doesn't wait until 11:42AM to start and doesn't end at 11:45AM, it starts right away and runs your job 180 times, over and over and quickly as it can. The step of one equates to one loop, not one second after all.
Unless version 8.x has magically made those stages time aware somehow.
![Confused :?](./images/smilies/icon_confused.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
No, there's no time awareness, but the Iconv() functions mean that you are working with seconds, at least conceptually. Yes, they're meaningless in the context of the loop, but fundamental to my explanation of why you might be seeing -14 errors being thrown.
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.
For start time, you'll either need to have your scheduler wait until the proper time to start or build a 'sleep until' routine that takes an argument time and based on the current time, sleeps the 'delta seconds' until then. Then enter the loop.
Inside the loop, you'll need another routine to check the current time against your desired end time, and when exceeded branch outside the loop.
Make sure your loop counter limit will support at least the number of iterations needed to reach your time limit. In other words, set it to a large number.
Inside the loop, you'll need another routine to check the current time against your desired end time, and when exceeded branch outside the loop.
Make sure your loop counter limit will support at least the number of iterations needed to reach your time limit. In other words, set it to a large number.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
What kind of help do you need? Like most things, there are many ways to skin this cat. One such...
1. Pass in a full ISO timestamp
2. Use the TimeDate() function to get the current date/time
3. Reassemble the output in ISO format
4. Directly compare the two strings
Or use whatever functions tickles yer fancy. Date() and Time() are available as are the system variables @DATE and @TIME. It's all in the online help.
1. Pass in a full ISO timestamp
2. Use the TimeDate() function to get the current date/time
3. Reassemble the output in ISO format
4. Directly compare the two strings
Or use whatever functions tickles yer fancy. Date() and Time() are available as are the system variables @DATE and @TIME. It's all in the online help.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers