Skip to Content
Former Member
Jul 30, 2009 at 09:26 AM

How to return exit code to unix if running job scripts



I have exported a Data Services job for testing and out as The content of the job is a scripts with these lines:

exec('[$$Lib_Scripts]/', 'FAILED 66', 0);

raise_exception_ext('##### Yahoo!!! Failed ! ######', 55);

A sub unix scripts of is created also just to return the exit code out, like such:

echo "$1";

return $2;

I have also vi the job scripts, and insert a job launcher flag of -s as such:

AL_RWJobLauncher "/Inst/DataService/dataservices/log/JS_LSL01/" -ws

Then I run the job scripts by issuing ./ , and after that I keyed echo at unix command line --> echo "$?". I hoped to capture any return code or message from the job either is no 66 or 55, so that the third party job scheduler can take proper action against the return code.

However, I failed to get the return code out to the unix. May I know the correct way?