3 Replies Latest reply on Nov 16, 2012 3:02 PM by 946686

    ./startloadplan.sh return code always 0

    Stefan S
      We start a loadplan via $ODI_HOME/oracledi/agent/bin/startloadplan.sh Shell Script.
      We want to call the LoadPlan via external scheduler.
      The call looks like this:
      ./startloadplan.sh <MYLOADPLAN> GLOBAL "-AGENT_URL=<MYAGENT>"
      OracleDI: Starting load plan <MYLOADPLAN> in context GLOBAL ...
      2012-10-19 09:39:55.787 NOTIFICATION ODI-1659: Load plan "<MYLOADPLAN>", instance "2511011", run 1 has started
      echo $?

      The odiagent.log shows me that the loadplan failed.

      The Shell Script Return Value seems to be always 0. Altough documentation states:
      If a scenario or a Load Plan completes successfully, the return code will be 0. If not, the return code will be different than 0. This code will be available in:
      The return code of the command line call. The error message, if any, is available on the standard error output.

      How do I get the correct exit code and error output displayed ond stderr? Or is the documentation wrong?

      And: The above command returns immediately. Even tough the LoadPlan execution takes several minutes. I need the call of the shellscript to hang, until the Loadplan has finished, and then return the correct return code.

      ODI Version is on Redhat.

      Thanks for any hints