System Agent and Negative Return Codes
search cancel

System Agent and Negative Return Codes

book

Article ID: 124871

calendar_today

Updated On: 01-17-2019

Products

Workload Automation Agent

Issue/Introduction

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.

Environment

Release:
Component: SYSAGT

Resolution

The agent parameter oscomponent.noexitcode addresses this concern. https://docops.ca.com/ca-workload-automation-system-agent/11-4/en/reference/ca-wa-agent-for-unix-linux-windows-or-iseries-agent-parameters

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).