Page 1 of 1

DataStage scheduling

Posted: Fri Dec 02, 2005 9:21 am
by EJRoufs
Windows Server, version 7.1.

We use the DataStage Scheduler regularly, but we usually schedule jobs to run every Saturday, every 1st of the month, stuff like that. It works great for that. However, we have some jobs that we need to schedule once a month, but not always on the same day. Is there a way to schedule on a certain date each month? Is it any different in version 7.5, because we'll be upgrading to that soon?

Posted: Fri Dec 02, 2005 9:34 am
by ucf007
On the NT Platform, you can use AT commands ( on unix, crontab) ...
to schedule jobs instead of the DS schdluer.

Posted: Fri Dec 02, 2005 9:38 am
by ArndW
The scheduler in DataStage is just a front-end for the actual tool. The default scheduler on UNIX systems is cron, and that is what you are likely to be using.

If you want to do things not available in the GUI you can always edit your crontab manually, but you can specify a job to run every month on a given day; select the run to "every" and remove the DOW entry and just click on the day-of-month.

Posted: Fri Dec 02, 2005 4:11 pm
by ray.wurlod
Surely what you're already doing ("every 1st") covers what you've asked?

Posted: Mon Dec 05, 2005 1:46 pm
by EJRoufs
ray.wurlod wrote:Surely what you're already doing ("every 1st") covers what you've asked?
For the jobs that we run on every "1st", yes. We have jobs that run on a "set schedule", but not one that we can schedule using "every 1st" though. For example, we might have a job that runs on "work day -4" for us each month. That would be December 27th, January 26th, February 23rd, March 28th, etc. So, we KNOW the exact dates that we need to run on, but it is not a date that we can currently schedule using the DataStage Scheduler in version 7.1.

Posted: Mon Dec 05, 2005 7:54 pm
by ray.wurlod
That is true. But you could schedule it for the 28th then use a routine to edit the AT queue entry appropriately.

Posted: Mon Dec 05, 2005 10:42 pm
by shabari82
Hi EJRoufs,

You can achieve this scheduling scenario like this in unix.

1) Use a parameter file which stores the date on which the job should be scheduled.

2) Write a shell script to pick the date from the parameter file and run the DataStage Job on that particular day.

3) First you need to schedule the Shell script daily. It check the parameter file daily for date. Wirte the logic in such a way that if the parameter file is empty dont do anything else if any valid date is present in the parameter file, start scheduling your datastage job using another script.


This should work. I am giving you an idea but I havent tried. pls do this and tell me whether this works fine or not.

Thanks,
Shab

Schedule DataStage Job Monthly but on different Days.

Posted: Mon Dec 05, 2005 10:43 pm
by shabari82
Hi EJRoufs,

You can achieve this scheduling scenario like this in unix.

1) Use a parameter file which stores the date on which the job should be scheduled.

2) Write a shell script to pick the date from the parameter file and run the DataStage Job on that particular day.

3) First you need to schedule the Shell script daily. It check the parameter file daily for date. Wirte the logic in such a way that if the parameter file is empty dont do anything else if any valid date is present in the parameter file, start scheduling your datastage job using another script.


This should work. I am giving you an idea but I havent tried. pls do this and tell me whether this works fine or not.

Thanks,
Shab

Posted: Mon Dec 05, 2005 11:49 pm
by ray.wurlod
Did you notice that the original poster is on Windows? :oops:

DataStage Scheduling

Posted: Tue Dec 06, 2005 12:52 am
by shabari82
ray.wurlod wrote:Did you notice that the original poster is on Windows? :oops:

Then write a dos batch script on windows NT or through datastage basic routines.....or Job control routines.....I said an example on Unix :idea: .....But that doesnt mean we cant do in Windows NT...using datastage api.... :o