How to schedule a batch with different dates in each month

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
reddy
Premium Member
Premium Member
Posts: 168
Joined: Tue Dec 07, 2004 12:54 pm

How to schedule a batch with different dates in each month

Post by reddy »

Hello sir,

I need to schedule a batch with different dated in each month.
For example in december i need to run this batch on dec 20th and dec 31st and january 4th,february 5th etc...
we have all these run dates in the oracle run_date table.
Can you please helpme out on this issue.

Thanks in advance.

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

Post by chulett »

How are you doing your job scheduling now? Not for this, but in general.

Through the Director, you can simply 'Add to Schedule' 12 times using the proper date in each month. Or an Enterprise Scheduler like Control-M could do this easily. But I assume you somehow want to leverage this 'run_date' in your Oracle table, yes?

Worst case you could run your job every day, check the Oracle table and if the current date is not found in the table, exit without further processing. Only on a successul hit would you complete the processing.
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Good piece of advice by Craig. If you want to make this dynamice then as Craig said, have a job that checks the date from oracle table. A job that is scheduled to run everyday that checks the current date with the dates in the oracle table, if there is a hit, it puts out a flag in a file. The batch job checks for that flag. If the flag is found, it will continue further processing, if not, it will end gracefully.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
reddy
Premium Member
Premium Member
Posts: 168
Joined: Tue Dec 07, 2004 12:54 pm

Post by reddy »

Thanks alot for valuable suggestions.

I am scheduling the jobs using Datastage Director.

Thanks
Reddy
reddy
Premium Member
Premium Member
Posts: 168
Joined: Tue Dec 07, 2004 12:54 pm

Post by reddy »

Hello Sir,

My business scenario like this :

1.I need to run job1 and job2 daily using batch1 except on 4th business day of every month.
2.I need to run job1 and jobx and joby 4th business day of every month
using batch2.

How can i design the batch and scheduling using datastage.

note: i will get the 4th business day of every month date from the oracle table.

Thanks in advance.
Reddy
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Use the advice given earlier to extend to your current requirement. Have your control job run every day. Check if todays date is 4th business day or not. You can use ICONV/OCONV with DW for that. If yes, then run batch1 else run batch2.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply