How to automate running of a DS job with unix

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
babbu9
Premium Member
Premium Member
Posts: 75
Joined: Tue Jun 01, 2004 9:44 am

How to automate running of a DS job with unix

Post 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
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

Hi,
Look into - Scheduling a Job Batch - in DataStage Help.

Ketfos
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply