Environment Variables not Set in Windows

Document ID : KB000097907
Last Modified Date : 29/05/2018
Show Technical Document Details
Question:
The %AUTOSYS% environment variable and others required for AutoSys to function from a Windows command line appear not to be set.  The AutoSys Admin UI, does show AUTOSERV, AUTOROOT, AUTOSYS, etc... are set.
Environment:
Workload Automation AE 11.x
Platform: Windows
Database: ANY
Answer:
By default the variables: AUTOROOT,AUTOSERV,AUTOUSER,AUTOSYS are set and seen within an AutoSys command prompt. They will not be seen from a normal DOS command prompt.

They can also be seen within a job depending on the agent's configuration.
Here is an example including excerpt from an agentparm.txt file:
oscomponent.environment.variable=C:\Program Files (x86)\CA\Workload Automation AE\SystemAgent\WA_AGENT\profiles\WAAE.txt oscomponent.environment.variable_manager_MOM_SCH=C:\PROGRA~2\CA\WORKLO~1\SystemAgent\WA_AGENT\Profiles\MOM.txt
The above tells the agent that if a job is sent to this agent it should source the profile WAAE.txt.
If the job is specifically from the AUTOSERV MOM then also source MOM.txt.

Here are sample contents of the files:
WAAE.txt
AUTOSYS=C:\PROGRA~2\CA\WORKLO~1\autosys
AUTOROOT=C:\PROGRA~2\CA\WORKLO~1
JAVA_HOME=C:\PROGRA~2\CA\WORKLO~1\JRE_WA PATH=C:\PROGRA~2\CA\WORKLO~1\autosys\bin;C:\PROGRA~2\CA\WORKLO~1\JRE_WA\bin;%PATH%

MOM.txt
AUTOSYS=C:\PROGRA~2\CA\WORKLO~1\autosys
AUTOROOT=C:\PROGRA~2\CA\WORKLO~1
AUTOUSER=C:\PROGRA~2\CA\WORKLO~1\autouser.MOM
JAVA_HOME=C:\PROGRA~2\CA\WORKLO~1\JRE_WA PATH=C:\PROGRA~2\CA\WORKLO~1\autosys\bin;C:\PROGRA~2\CA\WORKLO~1\JRE_WA\bin;%PATH%