Below job is failing with "incorrect function" error message.
* ----------------- PRD_BATCH_SALES ----------------- */
insert_job: PRD_BATCH_SALES job_type: CMD
command: E\:\custom-folder\test-batch-123.bat "Sales" "Sales-ANI"
machine: hostname1
owner: SVC-AUTOSYS-PRD@domain1
permission:
date_conditions: 0
condition: s(PRD_SALES_FW)
description: "This job creates the cube done file"
std_out_file: ">%TEMP%\%AUTO_JOB_NAME%.out"
std_err_file: ">%TEMP%\%AUTO_JOB_NAME%.err"
alarm_if_fail: 1
alarm_if_terminated: 1
send_notification: F
notification_msg: "A job has failed."
Thu May 20 10:06:43 2021 CAWA_I_20005 AFM: 20210520 03064339+0500 WIN_AGENT JavaAgent#tcpip@PR1_SCH 72652.362601782_1/WAAE_WF0.1/MAIN RUN . Data(Command="E:\custom-folder\test-batch-123.bat Sales Sales-ANI") ComponentType(AUTOSYS.APPSRV) Attribute1(Type=AsServers,Value="hostname1,hostname2") Attribute2(Type=AsPort,Value=9000) Attribute3(Type=AsToken,Value=75A16E0CA1FDD96F49A31816AD2D08359E9432DC5B1691D7E634EE07086D0B9AB76E17ACDCFDB948) Env(AUTOSERV=PR1,AUTO_JOB_NAME="PRD_BATCH_SALES",AUTORUN="362601782-1",STDERR=>"%TEMP%\\%AUTO_JOB_NAME%.err",STDOUT=>"%TEMP%\\%AUTO_JOB_NAME%.out") User(SVC-AUTOSYS-PRD) Password(masked_encrypted_password) MFUser(SVC-AUTOSYS-PRD) WOBRequestID(C5EB0BD40E127AC40F669187BEE3CC04B471768516214980038160)
Thu May 20 10:06:43 2021 CAWA_I_20008 Agent version: CA Workload Automation Agent for Windows 11.3 Build 979
Thu May 20 10:06:43 2021 CAWA_I_20010 The local security is bypassed
Thu May 20 10:06:44 2021 CAWA_I_20009 STDOUT = C:\Users\SVC-~1\AppData\Local\Temp\PRD_BATCH_SALES.out
Thu May 20 10:06:44 2021 CAWA_I_20009 STDERR = C:\Users\SVC-~1\AppData\Local\Temp\PRD_BATCH_SALES.err
Thu May 20 10:06:44 2021 CAWA_I_20006 --- Environment ---
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: ALLUSERSPROFILE=C:\ProgramData
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: APPDATA=C:\Users\SVC-AUTOSYS-PRD\AppData\Roaming
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: AUTOPID=1464
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: AUTORUN=362601782-1
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: AUTOSERV=PR1
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: AUTO_JOB_NAME=PRD_BATCH_SALES
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: CLASSPATH=.;E:\PROGRA~1\IBM\SQLLIB\java\db2java.zip;E:\PROGRA~1\IBM\SQLLIB\java\db2jcc.jar;E:\PROGRA~1\IBM\SQLLIB\java\sqlj.zip;E:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cisuz.jar;E:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cu.jar;E:\PROGRA~1\IBM\SQLLIB\bin;E:\PROGRA~1\IBM\SQLLIB\java\common.jar
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: COMMONPROGRAMFILES=C:\Program Files\Common Files
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: COMPUTERNAME=hostname1
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: COMSPEC=C:\Windows\system32\cmd.exe
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: DB2INSTANCE=DB2
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: DEFLOGDIR=C:\ProgramData\McAfee\DesktopProtection
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: DFSTRACINGON=FALSE
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: ESPAGENT=WIN_AGENT
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: ESPAGENTDIR=C:\Program Files\CA\Workload Automation AE\SystemAgent\WIN_AGENT
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: ESPAGENTHASH=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: ESPAGENTPORT=7520
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: ESPAGENTSPOOL=C:\Program Files\CA\Workload Automation AE\SystemAgent\WIN_AGENT\spool
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: ESPAGENTTOKEN=53DC5D5E87C65EC5BC004B05119D4E2C8910BD
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: ESPAPGEN=1
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: ESPAPPL=WAAE_WF0
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: ESPAPPLMGR=JavaAgent#tcpip@PR1_SCH
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: ESPOBJECT=72652.362601782_1/WAAE_WF0.1/MAIN
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: ESPWOB=72652.362601782_1
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: FP_NO_HOST_CHECK=NO
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: INCLUDE=E:\PROGRA~1\IBM\SQLLIB\INCLUDE;E:\PROGRA~1\IBM\SQLLIB\LIB
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: JAVA_HOME=E:\J2SDK
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: LD_LIBRARY_PATH=C:\Ora11gR2Clnt\client2\LIB
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: LIB=;E:\PROGRA~1\IBM\SQLLIB\LIB
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: LOCALAPPDATA=C:\Users\SVC-AUTOSYS-PRD\AppData\Local
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: NUMBER_OF_PROCESSORS=4
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: ORACLE_HOME=C:\Ora11gR2Clnt\client2
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: OS=Windows_NT
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: PATH=C:\Program Files\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft Network Monitor 3\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\PROGRA~1\BMCSOF~1\Patrol3\bin;E:\J2SDK\bin;E:\PROGRA~1\IBM\SQLLIB\BIN;E:\PROGRA~1\IBM\SQLLIB\FUNCTION;E:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;C:\Ora11gR2Clnt\client2\BIN;C:\Windows\System32\WindowsPowerShell\v1.0\
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: PROCESSOR_ARCHITECTURE=x86
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: PROCESSOR_IDENTIFIER=x86 Family 6 Model 45 Stepping 7, GenuineIntel
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: PROCESSOR_LEVEL=6
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: PROCESSOR_REVISION=2d07
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: PROGRAMDATA=C:\ProgramData
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: PROGRAMFILES=C:\Program Files
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: PSMODULEPATH=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: PUBLIC=C:\Users\Public
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: SYSTEMDRIVE=C:
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: SYSTEMROOT=C:\Windows
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: TEMP=C:\Users\SVC-GI~1\AppData\Local\Temp
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: TMP=C:\Users\SVC-GI~1\AppData\Local\Temp
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: TRACE_FORMAT_SEARCH_PATH=\\winseqfe\release\Windows6.0\lh_sp2rtm\6002.18005.090410-1830\x86fre\symbols.pri\TraceFormat
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: USERDOMAIN=DOMAIN1
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: USERNAME=SVC--AUTOSYS-PRD
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: USERPROFILE=C:\Users\SVC-AUTOSYS-PRD
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: VSEDEFLOGDIR=C:\ProgramData\McAfee\DesktopProtection
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: WINDIR=C:\Windows
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: EWA_JOB_STDOUT_FILE=C:\Users\SVC-~1\AppData\Local\Temp\PRD_BATCH_SALES.out
Thu May 20 10:06:44 2021 CAWA_I_20007 Environment variable: EWA_JOB_STDERR_FILE=C:\Users\SVC-1\AppData\Local\Temp\PRD_BATCH_SALES.err
Thu May 20 10:06:44 2021 CAWA_I_20013 Command to be executed: "C:\Windows\system32\cmd.exe" /c "E:\custom-folder\test-batch-123.bat Sales Sales-ANI"
Thu May 20 10:06:44 2021 CAWA_I_20022 Process created with pid: 5868
Thu May 20 10:06:44 2021 CAWA_I_20018 Job failed. Exit code 1, Status: "Incorrect function."
Release : 11.3, 11.4, 11.5, 12.0 and higher
Component : WORKLOAD AUTOMATION Agents
The command bat file resides on the E: drive. The job owner is unable to get appropriate permissions on the E-drive to execute the script.
This situation might arise if the the User Access Control is enabled on windows agent server. Ensure the job owner has all the appropriate privileges in accordance with UAC.
Configure the agents to run in the highest privileges (elevated) mode by enabling the following property in the agent configuration file (%AGENT_INSTALL_DIR%\agentparm.txt)