-
1. Re: Batch Script to Invoke IICS Taskflows using RunAJobCli
Varun Singh Apr 6, 2021 3:55 PM (in response to Pramod Thogaru)Hi Pramod,
RunAJobCli utility returns status code after execution of the command. In the script set the status code based on the below table and you can mark your job in third party tool based on the return code or capture the error response.
Code
Description
-1
Exception
0
Success
1
Warning
2
No wait
3
Failure
4
Timeout
5
Error
6
Running
-
2. Re: Batch Script to Invoke IICS Taskflows using RunAJobCli
Pramod Thogaru Apr 7, 2021 6:23 AM (in response to Varun Singh)Hi Varun,
Problem here is %errorlevel% variable not able to capture RunAJobCli utility returns status code. As a workaround, I modified my script like below to read the RunAJobCli utility log and capture the return code from there to resolve my issue.
cd.>nul | cli.bat runAJobCli -t %TaskType% -un %TaskName% -w true >> %LOGFILE% 2>&1
FOR /F "delims=" %%A IN (%LOGFILE%) DO (
set lastline=%%A
)
echo %lastline%
set return_code=%lastline:~-1%