Page 1 of 1

Routine Reqd. For Incremetal Load

Posted: Wed Dec 06, 2006 4:01 am
by stiwari
Hi Everybody,

I need help on urgent basis and i would be greatful if you can provide me the solution.

I have some tables where the no. of records is very huge and i want to do an incremetal load for them. The criteria for this is Selecting the Records after a specified Date. Now the value of this Date is stored in a Seq File. Now i need help in creating a routine where the routine passes the Date value as PArameter.

The Structure of my Seq File is as follows

Table_Name Start_Value

Table_A 2006-12-01 11:30:23
Table_B 2006-12-01 13:30:23
Table_C 2006-12-02 16:23:45

I have separate jobs for Table_A, Table_b & Table_C

I want a routine where it should pick up the Start_Value which is against Table_A and pass this Start_Value in a variable when executing the job of Table_A and the same process it should follow for the Table_B & Table_C

The location of my Seq. File is
/dstage/tmp1/Inc_Load_Tbl.txt where Inc_Load_Tbl.txt is the name of the seq. file.

Can you please provide me the code for the routine.

If i have missed out anything plz. let me

Re: Routine Reqd. For Incremetal Load

Posted: Wed Dec 06, 2006 4:43 am
by ajith
stiwari wrote:Hi Everybody,

I need help on urgent basis and i would be greatful if you can provide me the solution.

I have some tables where the no. of records is very huge and i want to do an incremetal load for them. The criteria for this is Selecting the Records after a specified Date. Now the value of this Date is stored in a Seq File. Now i need help in creating a routine where the routine passes the Date value as PArameter.

The Structure of my Seq File is as follows

Table_Name Start_Value

Table_A 2006-12-01 11:30:23
Table_B 2006-12-01 13:30:23
Table_C 2006-12-02 16:23:45

I have separate jobs for Table_A, Table_b & Table_C

I want a routine where it should pick up the Start_Value which is against Table_A and pass this Start_Value in a variable when executing the job of Table_A and the same process it should follow for the Table_B & Table_C

The location of my Seq. File is
/dstage/tmp1/Inc_Load_Tbl.txt where Inc_Load_Tbl.txt is the name of the seq. file.

Can you please provide me the code for the routine.

If i have missed out anything plz. let me

You can write a Unix script to run the respective jobs passing the values fetched from Inc_Load_Tbl.txt as job parameters. Get the date curresponding to the Table_A and pass it as the start value for the first job
You can do it by using dsjob command along with -param option.

You can do the same for the other tables too in the same script or in different scripts according to your requirement.

Hope that helps,
Ajith

Re: Routine Reqd. For Incremetal Load

Posted: Wed Dec 06, 2006 5:23 am
by ray.wurlod
stiwari wrote:I need help on urgent basis and i would be greatful if you can provide me the solution.
Etiquette Note
We don't do urgent here. We are all volunteers, no-one is paid for posting. If you want urgent, sign up for premium service with your support provider, and learn the true cost of urgent.


As for "provide me the solution", have you accepted this engagement as a DataStage developer? If so, you ought to be competent enough to develop your own solutions.

I am in the business of providing solutions, but not for free. This is true of a number of other posters here also. What we do provide here (free) is guidance.