Page 1 of 1

Unix Script not executing from DataStage

Posted: Thu Oct 30, 2014 10:55 am
by neeraj
Hello,

I am trying to execute the Unix script from DataStage using Execute_Command Stage.

THe Unix script is(test.ksh) :-
#!/bin/ksh
echo "Test"

I have given full permission to this script.

During execution I am getting below mentioned error
Executed: sh /home/test.ksh
Reply=127
Output from command ====>
sh: /home/test.ksh: not found.
Command sh -x /home/test.ksh did not finish OK, reply = '127'

When I am executing the same script from Putty, it is working fine.

PLease guide.

Regards
NM

Posted: Thu Oct 30, 2014 12:29 pm
by chulett
Is this script on your ETL server? Does the job's executing user have the permissions it would need to run it?

Posted: Thu Oct 30, 2014 1:57 pm
by PaulVL
Please comfirm the actual path to your test.ksh script.

I do not believe it is /home/test.ksh

I think it might be /home/yourUserId/test.ksh

If so, please make sure that the user id that is executing the job, has execute authority into your home directory, not for the test.ksh script in question.


it could also be something as simple as /bin/ksh may not exist.

(if you are on an AIX box, try /usr/bin/ksh )