Is it possible to capture the UNIX exit code from DS

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
120267
Participant
Posts: 30
Joined: Tue Jun 07, 2005 12:27 am

Is it possible to capture the UNIX exit code from DS

Post by 120267 »

Hi,

We are calling one shellScript stored in param InputArg1 using "Call 'DSU.ExecSH'(InputArg1, result1) " , The shell will exit with different set of exit codes such as 5,4 and i have to capture the return codes and act accordingly.But the "result1" is always having 0 or 1.Will you please help me on how to capture the return codes from the shell.
With Love,

«·´`·.(*·.¸(`·.¸ ¸.·´)¸.·*).·´`·»
«.......>>>> Siva.G<<<<......»
«·´`·.(¸.·*(¸.·´ `·.¸)*·.¸).·´`·»
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

I suggest you look at the code for ExecSH and copy it to a new Routine, modify it to behave as you desire, and then use your new one.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Prefer DSExecute(). The third argument captures the output and the fourth argument captures the exit status.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply