Compilation of Job before Execution through Job Scheduler

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Amit_111
Participant
Posts: 134
Joined: Sat Mar 24, 2007 11:37 am

Compilation of Job before Execution through Job Scheduler

Post by Amit_111 »

Hi all,

I have to execute some jobs through Job scheduler every week. But there are chances that the jobs might get aborted during a particular run. But now before the next run these job should be complied. I do not want to do this manually. Is there a method where all the jobs are compiled just before the Job scheduler runs the Job??

There is no such option to compile the jobs when they are scheduled for the first time.
Also I had clicked the option "AutoCompile Job before Debug" in Designer for the jobs but it didnt work and the aborted jobs were NOT compiled automatically and the jobs didnt run next time.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

There's no such option as there's no need to compile aborted jobs. :?

You need to Reset any aborted jobs, not recompile them. That's why there is a 'Reset if needed then run' option in Sequence jobs and why there is a reset option available from the dsjob command.

If by 'Job Scheduler' you mean via the Director, then you are pretty much out of luck. Jobs can't reset themselves so your Operators or whomever is minding the store must handle any aborts there manually. Now, if you used a 'Enterprise' scheduler like Control-M, you have all kinds of options.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Amit_111
Participant
Posts: 134
Joined: Sat Mar 24, 2007 11:37 am

Post by Amit_111 »

Ok then.....One solution I can see is that I will put all the Jobs in one sequencer in which I will keep the option as 'Reset if needed then run' and then Schedule it through the director. Even if the Jobs fail the sequencer will show status as "Finished"( so no need to compile ) and since I have set the reset cindition, during the next run it will automatically reset the aborted job and go further......Is this fine??
Or is there any other better solution to this if I have to schedule only through Director.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

The control really depends upon how you design. If you need restartability you need to make the sequence jobs restartable. If you have a few jobs then putting them in a single line is ok but if you have many jobs, then build sequences and child sequences. Or simple write a batch job, in which you have more control and can check job status and reset jobs etc.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Amit_111 wrote:Ok then.....One solution I can see is that I will put all the Jobs in one sequencer in which I will keep the option as 'Reset if needed then run' and then Schedule it through the director. Even if the Jobs fail the sequencer will show status as "Finished"( so no need to compile ) and since I have set the reset cindition, during the next run it will automatically reset the aborted job and go further......Is this fine??
Or is there any other better solution to this if I have to schedule only through Director.
May help but doesn't really change things. What happens when the Sequence job itself aborts? You'll still need to reset it manually.

Any job you schedule directly from Director - Sequence, Server, Batch, anything - will need to be reset before it can run again.

Back in the Old Days when we did things that way, I built a job to go through all of the jobs in the project and reset any aborted jobs. It ran last in the night and emailed a list of whom it ended up resetting out to the support personnel. You need to consider something like that, it would seem.
-craig

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