This discussion is archived
3 Replies Latest reply: Nov 16, 2012 7:02 AM by 946686 RSS

./startloadplan.sh return code always 0

Stefan S Newbie
Currently Being Moderated
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 $?
0

The odiagent.log shows me that the loadplan failed.


The Shell Script Return Value seems to be always 0. Altough documentation states:
http://docs.oracle.com/cd/E23943_01/integrate.1111/e12643/running_executions.htm#BABBEDEG)
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 11.1.1.6.0 on Redhat.

Thanks for any hints

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points