System Agent and Negative Return Codes

Document ID : KB000124871
Last Modified Date : 17/01/2019
Show Technical Document Details
We have lots of kornshell scripts that does a exit -1 when it wants to return a failure. The script finishes but it send no status back to the MF CA7 scheduler. The scheduler is showing that the job is still active when actually it is it no longer running.
The agent parameter oscomponent.noexitcode addresses this concern.

Set oscomponent.noexitcode=256
recycle agent.
rerun the job

This should return the proper 255 exit code when the script exits with a -1 code. Without this parameter setting in place on the agent, if you are trying to force a -1 return code in your script, the script appears to remain in Executing status; regardless of what scheduler is used (AutoSys, dSeries, CA7, ESP).