problem using execute command stage

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
UPS
Premium Member
Premium Member
Posts: 56
Joined: Tue Oct 10, 2006 12:18 pm
Location: New Jersey

problem using execute command stage

Post by UPS »

Hi,
I am running a dsjob (Multiple Instances) using a shell script from the execute command stage. If all the instances of the job run then i return a code 0 else 1. I trigger two different jobs based on the return code.I tried using stage_value.$CommandOutput and
stage_value.cmd.$ReturnValue
but both of them are not able to capture the return code of the shellscript
please let me know if there is a way in which I can capture the return code of the shell script
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: problem using execute command stage

Post by chulett »

UPS wrote:stage_value.cmd.$ReturnValue
Is that a typo? You should be using "stage_value.$ReturnValue" - there's no ".cmd" in there.
-craig

"You can never have too many knives" -- Logan Nine Fingers
michael_west
Premium Member
Premium Member
Posts: 7
Joined: Mon Jul 25, 2005 8:40 am

Post by michael_west »

I switched to using routine stage with execSH routine because of problems with error handling. I don't remember what these problems were, but I don't have any problems now. It is a fine option for running scripts.
rajeevn80
Participant
Posts: 28
Joined: Mon Jan 31, 2005 10:58 pm

Re: problem using execute command stage

Post by rajeevn80 »

Creating your own specific routine for this will be a better option.
Rajeev
Nobody knows Everything,
But U should not be the One who knows Nothing.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or perhaps... oh, I don't know... a Job Activity stage?
-craig

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