We have 200+ jobs which starts with period ( . ) as a command that runs fine in R11 and fails in R12.
Example:
insert_job: autosys-test-job-uat-agent job_type: CMD
command: . /prod/common/etc/init.environ
Command Works in R11:
$ autorep -J autosys-test-job-uat-agent -d
Job Name Last Start Last End ST/Ex Run/Ntry Pri/Xit
________________________________________________________________ ____________________ ____________________ _____ ________ _______
autosys-test-job-uat-agent 2021-12-09 05:38:37 2021-12-09 05:38:38 SU 154388/1 0
Status/[Event] Time Ntry ES ProcessTime Machine
-------------- --------------------- -- -- --------------------- ----------------------------------------
STARTING 2021-12-09 05:38:37 1 PD 2021-12-09 05:38:37 test.com
RUNNING 2021-12-09 05:38:37 1 PD 2021-12-09 05:38:38 test.com
<Executing at uat_agent>
SUCCESS 2021-12-09 05:38:38 1 PD 2021-12-09 05:38:38 test.com
Command fails in R12:
$ autosyslog -J autosys-test-source -tE
.: .: is a directory
$ autorep -J autosys-test-source -d t
Job Name Last Start Last End ST/Ex Run/Ntry Pri/Xit
________________________________________________________________ ____________________ ____________________ _____ ________ _______
autosys-test-source 2021-12-15 02:35:12 2021-12-15 02:35:12 FA 5629113/1 126
Status/[Event] Time Ntry ES ProcessTime Machine
-------------- --------------------- -- -- --------------------- ----------------------------------------
STARTING 2021-12-15 02:35:12 1 PD 2021-12-15 02:35:12 test.com
RUNNING 2021-12-15 02:35:12 1 PD 2021-12-15 02:35:13 test.com
<Executing at crash_agent>
FAILURE 2021-12-15 02:35:12 1 PD 2021-12-15 02:35:13
[*** ALARM ***]
JOBFAILURE 2021-12-15 02:35:13 1 PD 2021-12-15 02:35:13 test.com
Release : 11.5, 12.0
Component : Workload Automation System Agent
Starting a UX command with a dot and then a space is telling the operating system to source the file.
As in sourcing a user's profile.
That is different than executing a script.
If you are trying to execute the script /ms/dist/environ/PROJ/core/prod/common/etc/init.environ
you should not prefix it with the dot and space like you have listed in the job definition.
command: . /prod/common/etc/init.environ
you should enter it like this
command: /prod/common/etc/init.environ
Job definitions do offer a setting for profile if you need to source something for a script.
As for why you are seeing behavior difference between version,
there have been some fixes in the newer agents with the handing of and confirming proper valid shells.
Perhaps your jobs worked because of the lack of checking in the older version.
Also you might compare the agentparm.txt files between the environment where it is working vs where it is not.
The agentparm.txt file settings can change the way jobs are executed.
For more details on the agentparm.txt file settings see:
https://techdocs.broadcom.com/us/en/ca-enterprise-software/intelligent-automation/workload-automation-system-agent/12-0/release-notes.html