ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

CA WA Autosys: Shell specified for a script is not used by the WA Agent

book

Article ID: 186610

calendar_today

Updated On:

Products

CA Workload Automation AE - Business Agents (AutoSys) CA Workload Automation AE - System Agent (AutoSys) CA Workload Automation AE - Scheduler (AutoSys) Workload Automation Agent CA Workload Automation AE

Issue/Introduction

Users on WA Agent R11.5 may see that shell defined in the script is ignored by the agent.

#!/bin/ksh
cat /proc/$$/cmdline

Cause

The WA Agent 11.5 creates a wrapper script for AutoSys cmd jobs.  The agent may ignore the shell in the script and will use the shell in the job or the shell from user profile.  

Environment

Release : 11.5

Component : CA Workload Automation System Agent

Resolution

There is a known issue in 11.5 agent which is fixed in the release 12.0

SYSAGT-353: Shell Specified for a Script May Not Be Used When Running Command Jobs in UNIX
Shell Specified for a Script May Not Be Used was returned when running command jobs in UNIX, the shell directive (first line in shell script) was not honored by the agent. Also, this fix allows Perl scripts to run correctly.
 
SYSAGT-353: Shell Specified for a Script May Not Be Used When Running Command Jobs in UNIX

The workaround is to use the SHELL parameter in the job definition.

For example

shell: /bin/ksh