Run Shell script through DS job

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
atulgoel
Participant
Posts: 84
Joined: Tue Feb 03, 2009 1:09 am
Location: Bangalore, India

Run Shell script through DS job

Post by atulgoel »

Hi,

How to run the Shell script through DS job?

Thanks Atul
miwinter
Participant
Posts: 396
Joined: Thu Jun 22, 2006 7:00 am
Location: England, UK

Post by miwinter »

Call it in a before or after job routine.
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
atulgoel
Participant
Posts: 84
Joined: Tue Feb 03, 2009 1:09 am
Location: Bangalore, India

Post by atulgoel »

Thanks Marks..

Can I call the ExecSH routine in the job.? My requirement is to execute the script on the output file of the job.

Please help to how can i do it?

Thanks
Atul
Atul
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Then it can be an 'After job'.
miwinter
Participant
Posts: 396
Joined: Thu Jun 22, 2006 7:00 am
Location: England, UK

Post by miwinter »

Yes, employ ExecSH in an after-job routine.
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
atulgoel
Participant
Posts: 84
Joined: Tue Feb 03, 2009 1:09 am
Location: Bangalore, India

Post by atulgoel »

Thanks..

I am first time using this. Can You please guide me how can I call this in my job?

Thanks
Atul
miwinter
Participant
Posts: 396
Joined: Thu Jun 22, 2006 7:00 am
Location: England, UK

Post by miwinter »

Please refer to the documentation - it's in the Designer guide.
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Those options are part of the job Properties page, you'll see an entry for both 'before' and 'after' job actions there. Change the after property to ExecSH and then put the full path to the script in the box next to it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
RAJARP
Participant
Posts: 147
Joined: Thu Dec 06, 2007 6:46 am
Location: Chennai

Post by RAJARP »

Hi atul,
One more approach is that, you can do that in a job sequence also.

Parallel job ---->Execute command activity

Inside Execute command activity , by giving proper command and parameters ,you can execute the script on your output file

Regards,
Raja R p
arnabdey
Participant
Posts: 50
Joined: Wed Jan 10, 2007 5:56 am

Post by arnabdey »

Hi

Go to properties tab, you will find two options as before job and after job subroutine. Use ExecSh or ExecShSilent as per your requirements (the second one is appropriate if you are using userid/passwords as parameters to the script). If you want to execute it before your job starts use the before job routine or if it is to be executed at the end use after job routine). Remember you should provide the absolute path of the script to be on safer side, followed by its parameters.
Arnab
Post Reply