rahuldbhandare
29th June 2008, 10:12
Hi,

I am running a job through Baan. The job has a shell command included in it as follows

sh <shell script name>

The Job gets executed successfully, but in Job history messages it shows
following message

Error 127 in running the shell script <shell script name>

The job runs successfully, but it shows above message in Job session history.

Please help in this regard

bdittmar
29th June 2008, 19:26
Hi,

I am running a job through Baan. The job has a shell command included in it as follows

sh <shell script name>

The Job gets executed successfully, but in Job history messages it shows
following message

Error 127 in running the shell script <shell script name>

The job runs successfully, but it shows above message in Job session history.

Please help in this regard

Hello,

here are UNIX error codes:

0: no error
126: program returned exit code 126 or execve(2) failed with
ENOEXEC
127: program returned exit code 127 or the command was not
found
128+: program returned exit code >128 or it was terminated by a
signal
255+: program was terminated by a signal (and shell behaves like
ksh93)

Maybe the path to your shell script is not correct.

Regards

günther
1st July 2008, 12:12
I guess that your shell script does not set an appropriate exit code! What about a final "exit 0"?

NPRao
1st July 2008, 21:18
sh <shell script name>
I don't think you need the sh there. Refer to the screen shot from our system.
Make sure you have the appropriate shell set in your shell script:
#!/bin/ksh
...

Post your shell script for others' reference.

bdittmar
2nd July 2008, 11:27
Hi,

I am running a job through Baan. The job has a shell command included in it as follows

sh <shell script name>

The Job gets executed successfully, but in Job history messages it shows
following message

Error 127 in running the shell script <shell script name>

The job runs successfully, but it shows above message in Job session history.

Please help in this regard

Hello,

does the called script run successfully ?

Try to give the whole path, like :

/home/users/myuser/myscript

or does your script need an environment variable, which is not set at execution of your script ?

Regards

eppesuiG
3rd July 2008, 16:30
Hi,
in the job definition you only have to set the complete pathname of your shell script. The file should be executable (bit x) the the user that runs the job. If the file is a shell script, than it should start with "!# /bin/sh" as the first line. Moreover, the executable or shell script should return a vlid exit code, i.e. a non zero means error (and will reported in the job history), while zero mens ok.

Bye,
Giuseppe