2 Replies Latest reply on Apr 7, 2021 6:23 AM by Pramod Thogaru

    Batch Script to Invoke IICS Taskflows using RunAJobCli

    Pramod Thogaru New Member

      We are using below batch script to invoke IICS taskflow but the issue is after taskflow execution completed errorlevel capturing as "0" for both success and failure cases. We are not able to capture errorlevel If we dint use "cd.>nul | " while executing cli.bat. Any help is much appreciated.

       

      cd C:\Program Files\Informatica Cloud Secure Agent\apps\runAJobCli

      cd.>nul | cli.bat runAJobCli -t %TaskType% -un %TaskName% -w true>nul 2>&1

      set return_code=%errorlevel%

      echo Informatica task %TaskName% execution return code is %return_code% >> %LOGFILE%

      if %return_code%==0 (

      echo %TaskType% %TaskName% execution completed successfully >> %LOGFILE%

      goto :End

      )

      if %return_code%==-1 (

      echo Exception encountered while executing %TaskType% %TaskName%>> %LOGFILE%

      goto :End

      )

      .

      .

      .

      .

      :End

      exit %return_code%