Page 1 of 1

Capturing the Exit Status of a Shellscript and affect DS Job

Posted: Tue Aug 08, 2006 12:06 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 12:43 pm
by narasimha
I would suggest to use a job sequence.
You could use a Execute Command or embed your shell script in a routine,
Now you can read the ReturnValue and based on that you can Abort your job

Posted: Tue Aug 08, 2006 2:47 pm
by vinay_renu2001
narasimha wrote:I would suggest to use a job sequence.
You could use a Execute Command or embed your shell script in a routine,
Now you can read the ReturnValue and based on that you can Abort your job
Thanks a lot Narasimha... :D

Fabulous idea!!! Just based on your suggestion my entire process has been changed.

I will keep you posted my progress.

Thanks :)