Page 1 of 1

How to automate running of a DS job with unix

Posted: Mon Jul 19, 2004 2:17 pm
by babbu9
Hi
I am interested in automating some of the jobs I have created using designer. I know that we can export the project as .dsx files but do not know how to automate running the jobs at a set time...say 10:00pm every monday.
What is the extension of the job/container/job sequence files created in DS.

Can you give me an sample unix(korn) script to do this.

Thanks

Posted: Mon Jul 19, 2004 2:29 pm
by ketfos
Hi,
Look into - Scheduling a Job Batch - in DataStage Help.

Ketfos

Posted: Mon Jul 19, 2004 2:34 pm
by ketfos
Hi,
You can also create CRON job in which you can define day and time of execution of the jobs
Call a shell script in the cron job
In the shell script use ---dsjob-- command to invoke the datastage job.
Of course you will need to define parameters for connecting to datastage.

Ketfos

Posted: Mon Jul 19, 2004 3:45 pm
by chulett
The fact that projects export with an extension of .dsx has no bearing on what you need to do to get them scheduled. And if you are running a Windows server as your post indicates, then korn shell scripts aren't going to be a whole lot of help, either. :wink:

In any case, Ketfos has you on the right track - let DataStage handle the scheduling for you. It's an option in the Director and it makes it very simple to set up and manage recurring schedules for jobs. For starters, simply right-click on a job and select 'Add to Schedule'.

If you really need to do this from the command line, say for integration into an Enterprise scheduler like Control-M, then look into the dsjob command. It is documented in the Server Job Developers Guide in the section entitled Command Line Interface. You can also search here and find a number of examples of how people are building scripts to wrapper it.