How to run shell scripts in sequence jobs

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
developeretl
Participant
Posts: 89
Joined: Sat Jul 24, 2010 11:33 pm

How to run shell scripts in sequence jobs

Post by developeretl »

Hi,
Iam having sequence jobs i need to run shell scripts .... how should i use them in the sequence jobs and what conditions ineed to keep to make sure it runs successfully.......
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

Pls do not use SMS style dotted statementes. Use the ExecSH feature in the job properties. You can use it a before-job or afer-job routine. You can also return an error code

Regards
Sreeni
developeretl
Participant
Posts: 89
Joined: Sat Jul 24, 2010 11:33 pm

Post by developeretl »

Iam using sequence job so i cant use after job or before job.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: How to run shell scripts in sequence jobs

Post by ray.wurlod »

developeretl wrote:how should i use them in the sequence jobs
Invoke from Execute Command activity.
developeretl wrote:what conditions ineed to keep to make sure it runs successfully.......
That's entirely within the purview of the author of the shell script. The job sequence will detect the exit status of the shell script (accessible as an activity variable and in a trigger on the Execute Command activity). Usual rules: 0 = success, non-zero = failure.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
developeretl
Participant
Posts: 89
Joined: Sat Jul 24, 2010 11:33 pm

Re: How to run shell scripts in sequence jobs

Post by developeretl »

Hi Ray,
Thanks for the reply. Iam seeing trigger tab what should I mention in that tab.
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

The trigger conditions allow you to design/define what you want after the execution of the shell script (Execute Command Activity) or other prior Job Activities in the Job Sequence. You can go through the help to understand what each of the options within the drop down box of the trigger tab means.
Kris

Where's the "Any" key?-Homer Simpson
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

Sreenivasulu wrote:Pls do not use SMS style dotted statementes.
And you just used one :wink:
Kris

Where's the "Any" key?-Homer Simpson
Post Reply