Re-startability in Server Job?

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
vnspn
Participant
Posts: 165
Joined: Mon Feb 12, 2007 11:42 am

Re-startability in Server Job?

Post by vnspn »

Hi,

We have a Job that reads a huge number of records from a flat file and loads it into a table.

I know that restartability option is only available in Job Sequence using the Checkpoint option. Is there a method to make the individual Job re-startable? That is, if the Job gets failed at a certain point, then re-start the Job from the record it had failed (by skipping all the records that has been already read in the previous run)?

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

Post by chulett »

Sure. The fact that your source is a flat file simplifies this and I'm assuming you are doing commits over the course of this load.

A Job Parameter that is the 'number of records to skip' - i.e. the number successfully loaded to this point. Then it's just a constraint:

Code: Select all

@INROWNUM > #RecordsToSkip#
Default the value of the job parameter to 0.

It gets more complicated if you want to automate this, but that's it in a nutshell for your situation.
-craig

"You can never have too many knives" -- Logan Nine Fingers
vnspn
Participant
Posts: 165
Joined: Mon Feb 12, 2007 11:42 am

Post by vnspn »

Ok, the first time when I run, I can pass the value for the Job Parameter 'RecordsToSkip' to be '0'. But when there is a failure, how will the required value be passed to this parameter. Thats what do u mean by saying "automate"? But this needs manual effort to pass the required value. By the way, can I see the exact row number that has caused the failure in the logs?

We are thinking of something, where the job is just re-started, it should start picking up records from the point it had left in the previous run?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

vnspn wrote:We are thinking of something, where the job is just re-started, it should start picking up records from the point it had left in the previous run?
That would be the 'automated' part.

Stop and think about how it would need to work. Outline the steps needed to accomplish that. Then implement them in your DataStage job and/or job control.

Otherwise, yes - your operators will need to determine where it left off (last commit point?) and then pass in that value when they restart the job.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Your design has to keep track of, and record in some persistent form, where it successfully ended. A restart can then pick up this value as the new start point. There are many possible variations on how you might achieve this; use the logic of the above sentence to design one that suits your particular requirements.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply