CAWA_I_20018 Job failed. Exit code 1, Status: "Incorrect function."
CA Workload Automation AE
CA Workload Automation System Agent on Windows.
Missing System Agent configuration parameter "oscomponent.cmdprefix.force=true" and/or the Windows machine definition missing the "opsys: windows" (JIL) attribute.
Windows Security policy or GPO may also be interfering with the job.
Add the following to the agenparm.txt file
"oscomponent.cmdprefix.force=true"
Excerpt from the job log with the aforementioned setting:
CAWA_I_20013 Command to be executed: "C:\Windows\SYSTEM32\cmd.exe" /c echo %DATE% %TIME% >> C:\Temp\test.txt
Run the job manually to see if any security warning pops up, like this:
Security warning
Run only scripts that you trust. While scripts from the internet can be useful. this script can potentially harm your computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning message. Do you want to run C:\tmp\somescirpt.ps1?
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D">: R
Fix the security, so that scripts or command can run without any input or prompt.
We do not recommend using output / error redirection in the command line. Instead, use the std_err_file and std_out_file JIL attributes to achieve the same objective.
For example:
Remove the ">> C\:\Temp\test.txt" bit from the command part of the job definition and add the following attributes:
std_err_file: >> C\:\Temp\test.txt
std_out_file: >> C\:\Temp\test.txt
https://techdocs.broadcom.com/us/en/ca-enterprise-software/intelligent-automation/workload-automation-system-agent/11-4/configuring/configure-the-agent/configure-the-agent-to-behave-like-a-legacy-remote-agent.htmlhttps://docops.ca.com/ca-workload-automation-system-agent/11-4/en/reference/ca-wa-agent-for-unix-linux-windows-or-iseries-agent-parameters#CAWAAgentforUNIX,Linux,Windows,oriSeriesAgentParameters-oscomponent.cmdprefix.force
<Command file not found> error on CA WA System Agent:
https://knowledge.broadcom.com/external/article?articleId=72530