Page 1 of 1

Capturing the Exit Status of a Shellscript and affect DS Job

Posted: Tue Aug 08, 2006 12:03 pm
by vinay_renu2001
Hello Everyone,

I have a shell script which is being called in the "Before job sub routine" of a DataStage job. This shell script is on another Server which runs on Linux. Iam calling this script using "SSH" command to connect to the remote server where this script is located.

When this script is executed, I want to capture the exit status of that script. If the exit status != 0 then i want to abort the DataStage job.

This is not happeneing as of now with the current setup. :cry:

To achieve this, do i need to write a routine or do i have any built in process.

Any suggestion is greatly appreciated!!! :)

Thanks

Vinay

Posted: Tue Aug 08, 2006 5:58 pm
by kduke
I am not sure you can directly because ssh needs to return it to DataStage. Just try it and let us know. ExecSH has a return value. You can also use execute ... capturing ... returning ...

I would search for these.