5 Replies Latest reply: Nov 15, 2012 1:06 PM by 946686 RSS

    ODI startscen Return code

      How to get success or failure of package from 'STARTSCEN' ODI command? I wanted to pass the return code( success/Failure) of this 'STARTSCEN' to third party scheduler which executes ODI code.
        • 1. Re: ODI startscen Return code
          You could use substitution API <%=odiRef.getPrevStepLog("RC")%> in the step right next to your STARTSCEN command in some top level package and take actions according to the code returned by this exprission. This step should be linked by both OK and KO arrows.

          Edited by: apiminov on 07.06.2012 2:20
          • 2. Re: ODI startscen Return code
            I think this information will be useful. Can you please give me the example of API with STARTSCEN ? The Use of OK and KO I know but with your example, its difficult to understand. If required, please mail me the screen shot of package digram on silf_d@yahoo.com

            I am using $U scheduler and it is a product developed by ORSYP (French company) www.orsyp.com

            Requirement in details:
            $U does indeed accept return codes, however, it seems that ODI is sending back “return code 0” when the PKG fails, which is understood by $U as “all OK”, the idea would be to have a different return code when the PKG fails (I am just rep-phrasing the original statement)
            • 3. Re: ODI startscen Return code
              In Knowledge Module Developer's Guide for Oracle Data Integrator you could find information about this and other Substitution APIs. Note that RC (Return code) = 0 indicates no error. My proposition is:
              1) You have some scenario SCEN_A and you want to know the status of its execution
              2) You could make PKG_B with steps SCEN_A and the next step you could place procedure, inserting the value of <%=odiRef.getPrevStepLog("RC")%> in a temp table like

              create table ODI_SCENS
              SCEN_NAME varchar2(255),
              SCEN_STATUS CHAR(2)

              update ODI_SCENS
              set SCEN_STATUS = case when <%=odiRef.getPrevStepLog("RC")%> = 0 then 'OK' else 'KO' end
              where SCEN_NAME = <your scenario name>;

              And you third party app could use this table. It seems to be appropriate for different third party app.

              Another possible solution may be to write some java code with ODI SDK (Calling ODI scenario fom java program
              • 4. Re: ODI startscen Return code
                I am using below command to call different packages one by one-

                D:\oracle\product\11.1.1\Oracle_ODI_1\oracledi\agent\bin\startscen "PKG_POZ_BOSS_OMP_BSMASTERSTOCK" "-1" "TEST" "-NAME=btvmd79_odi_agent"

                Isn't there any way to return the failure/success of package execution using any option with STRTSCEN command? As suggested by you how can I asked each time $U scheduler to read from the error table. The above mentioned cmd is used to call different packages one by one sequentially. So the $U is scheduled with above command for all developed packages--near about 50-80 packages are called using above STARTSCEN cmd with different package name

                Thanks for the quick response.

                With Thanks,
                Shilpa Dhote
                • 5. Re: ODI startscen Return code
                  Were you able to capture your return code after running a scenario from command line? If you have resolved the issue can you share the same?