Resetting a 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
Zabeerulla
Participant
Posts: 38
Joined: Tue Jan 10, 2006 1:25 am

Resetting a job

Post by Zabeerulla »

Hi,

I have a job which populates a data from sequential file to a SQL table whose update action is "Clear table then insert rows". I have 10 records in the table and 5 records in the sequential file before running the job. If I run the job the 10 records are cleared from the table and 5 records are inserted into the table from the sequential file.

What should I have to do If I want to get the 10 records back in the table. i.e. I want to restore the table before the job ran.

If I reset the job, its not solving the above problem.
Thanks & Regards,

Zabi
loveojha2
Participant
Posts: 362
Joined: Thu May 26, 2005 12:59 am

Post by loveojha2 »

Reset has nothing to do with your requirement.
You could possibly write the contents of the SQL table to a Sequential File prior to running this job. And at the start if next run you could use the sequential file for populating the SQL table with the previous rows.

But why do you want something of this kind? What is your actual requirement, please post those here, so that we may be able to give you a better alternative.
Success consists of getting up just one more time than you fall.
Zabeerulla
Participant
Posts: 38
Joined: Tue Jan 10, 2006 1:25 am

Post by Zabeerulla »

Thanks for the reply.



1. A job, which populates 10000 of rows from Table1 to Table2.
2. If i stop the job or the job has been aborted after processing say 9000 rows, then all the updations done to the Table2 will be reverted back or Table2 will be in inconsistent state.

If it is in inconsistent state, what to do to get the table2 in a stage prior to the job run.
And
If I rerun the job whether it will start from the first row or from 9001 row.
Thanks & Regards,

Zabi
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The simplest solution in your case is to set the commit size to 0. That way if the job aborts or is terminated during the run it will not commit the database modifications and write nothing. When you re-run that job it will start at the beginning.
Post Reply