Sequencer Issue - Test and rerun if aborts - "error job

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Maximus_Jack
Premium Member
Premium Member
Posts: 139
Joined: Fri Apr 11, 2008 1:02 pm

Sequencer Issue - Test and rerun if aborts - "error job

Post by Maximus_Jack »

Hi
I have a scenario in the sequencer, I have a test job activity stage, which will run first, if it finishes successfully the rest of the job activities has to run, if it fails, then after one hour the job has to again rerun (i'm using the sleep command in the execute command stage to do the wait activity and looping back again to the test job activity enabling the "reset if required and run option).

While compiling i'm getting the "error job has no start points defined", i did some search on this error and found the reason, as it is being the first job on the sequencer i'm not getting an idea to over come this issue.

Any thoughts on this would be appreciated.

thanks
MJ
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You can't "loop back again to the test job activity", if that means what I think it does. If that's just a hard link from some point back to the beginning then your "first" stage is no longer a starting point as that would be a stage with only links coming from it and none going into it.

You'll need a true loop around your "test" job with actual Start Loop and End Loop stages controlling the iterations of the test and your sleep inside the loop when the test fails. End the loop when the test job executes successfully, not forgetting to handle any situation where the test job fails too many times or for too long a period of time.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Maximus_Jack
Premium Member
Premium Member
Posts: 139
Joined: Fri Apr 11, 2008 1:02 pm

Post by Maximus_Jack »

The loop back again is not from anywhere, its just from the Execute command
stage which is very next to the job activity, i have tried to put a small diagram
hope it helps

Code: Select all


        first_test_job-----lk_on_pass---->Consecutive jobs
                 | /\
   lk_onfail  |  |   lk_loop_back_after_sleep
                 |  |
                \/  |
        Execute_cmd_stg
(sleep cmd for 60 min, after 60 min, it has to go back to first test job )
ssnegi
Participant
Posts: 138
Joined: Thu Nov 15, 2007 4:17 am
Location: Sydney, Australia

Post by ssnegi »

Code: Select all

Start Loop Activity Numeric From 1, Step 1, To 24
^ |
| V
| first_test_job-----lk_on_pass---->Consecutive jobs 
| | 
| lk_onfail    
| | 
|\/ 
|Execute_cmd_stg Sleep 60 min
|| 
|V
End Loop Activity
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So, exactly the situation I described and something you cannot do. My answer still stands, I'm afraid.

And ssnegi, that's not a proper looping design for that, at least not in my book. The loop should only encompass the first job and loop while it fails. The iteration it succeeds it should exit the loop and run the rest of the jobs.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Maximus_Jack
Premium Member
Premium Member
Posts: 139
Joined: Fri Apr 11, 2008 1:02 pm

Post by Maximus_Jack »

Hi
I have found a way to do this, instead of directly connecting to the job
activity again, i used a sequencer stage and start and end loop to finish
this.

thanks for your response..

MJ
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So... any chance you can post this new design? I'm curious how different it might be from what I suggested.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply