Page 1 of 1

Sequencer Parameter Looping

Posted: Mon Nov 16, 2009 4:26 am
by n.parameswara.reddy@accen
Below is the scenario which i want to achieve by means of the Sequencer.
Sequencer calls the job that basically extracts the data from the table from certain period of time. For example, when the job is run for the first time given a parameter of start date (eg., 2005/01/01) till current date.(ie.,2009/11/16).
Today when am running the sequence,it should be
i.e,
Parameter Values :
#pStart# : '2005/01/01' ; #pEnd# : Current Date (2009/11/16)
select * from TblA where Date>=#pStart# and Date<=#pEnd#

When am running a month later (i.e. 2009/12/16), it should take the start date as the previous run's Current date and End date as the day's CurrentDate automatically.
i.e,
#pStart# : '2009/11/16'; #pEnd# : Current Date (2009/12/16)
select * from TblA where Date>=#pStart# and Date<=#pEnd#

and goes like that for subsequent runs.
Can anyone suggest a solution for this which can continue the load with just the beginning start Date.('2005/01/01' in this case)

I can do this my writing the value(CurrentDate) to sequencial file for each run and take the value from the file for the correspoding run.

Appreciate other options for achieving the same.
Thank you. :D

Posted: Mon Nov 16, 2009 4:52 am
by ArndW
It might be best to store this last-run-date in your database as opposed to a sequential file, that depends on whether or not other processes need to know the last run date.

Posted: Mon Nov 16, 2009 11:20 pm
by n.parameswara.reddy@accen
ArndW wrote:It might be best to store this last-run-date in your database as opposed to a sequential file, that depends on whether or not other processes need to know the last run date. ...
Thank ArndW.
Even i felt the same for it would be better if the Last Run date was stored in a table.The Problem is the Last Run date is no where captured in the Table :roll: , also not other processes need to know this last run date.

The workaround that i have done, used sequential file for fetching the last run date. I am just thinking there could be some option that would help in achieving this avoiding the creation of the file in some temp location which is just not used for any other purpose as such.

Any other suggestions would be helpful.
thank you. :)