Page 1 of 1

loop the job

Posted: Tue Aug 05, 2008 6:53 am
by IBMDS
In select statement i have to pass the parameters dynamically and its need to run through loop.

dynamic sql

where row_eff_date between #start_date# and #end_date#

first time it needs to run from the start_date = 20050101 and end_date = 20050331
second time : 20050401 to 20050630

like this i have to run quaterly to till date.

can any body please help me



Thanks

Posted: Tue Aug 05, 2008 6:56 am
by chulett
Do you literally need a looping structure? Will you process a single date at a time for the quarter or all dates in the range noted in a single iteration? Look into using a Sequence job to get the date range, what happens after that depends on your need.

Posted: Tue Aug 05, 2008 7:15 am
by IBMDS
Thanks Chulett,

Yes i need looping structure.
I would like to process all the dates within the quater. each time it has to process 90 days records.
can you please expalin with more details.
how to do it in sequencer job.

Thanks
IBMDS

Posted: Tue Aug 05, 2008 7:36 am
by chulett
Hmmm... I don't hear anything that says "loop" to me unless you are saying you need to run a single job 90 times, once for each date? Can you not just build a normal job and process all dates in the quarter in one run?