How do you change the default working directory for the JOB scheduled by CA ESP System Agent?
search cancel

How do you change the default working directory for the JOB scheduled by CA ESP System Agent?

book

Article ID: 54590

calendar_today

Updated On:

Products

Workload Automation Agent DSERIES- SERVER CA Workload Automation DE - System Agent (dSeries)

Issue/Introduction

Description:

By default, the working directory is the agent's installation directory so we have to add whole path for any .exe and files in the script. Is there a way to change the working directory?

Solution:

Since release R7, a new parameter oscomponent.initialworkingdirectory in agentparm.txt for the agent is available. The following can be found on the Administrator's Guide:

The default initial working directory for all the scripts:

  • SCRIPT - sets the path to where the script resides

  • USER - sets the path to the home directory of the owner of the script

  • PATH - sets the path to an absolute path to where the script should run If you do not specify a value, the parameter defaults to the path where the running cybAgent resides.


Note: You can override the InitialWorkingDirectory on a per job basis by specifying a value for the PWD Environment variable.

Environment

Release:
Component: SYSAGM