Automic Workload Automation

  • 1.  ACTIVATE_UC_OBJECT

    Posted May 14, 2018 03:48 PM

    does anybody know the system return code you get when you try to

    activate an object via the ACTIVATE_UC_OBJECT and the object doesn't exist? (object in activation misspelled... )

    I know you can check status after the active statement.. but we have a lot of code in place

    that doesn't check for a valid return code after the active... is there a system return code I can check for

    that would tell me I tried to activate an invalid named object?

    thanks



  • 2.  Re: ACTIVATE_UC_OBJECT

    Posted May 14, 2018 06:33 PM

    Typically this function returns the RUNID of the object it just launched.  But when it fails to launch, it returns a value of zero.  So you should check for zero as an indication of failure to launch.

     

    In addition, you can identify historical failures as well.  When it works, there will be a U00007000 message in the Activation report.  When it fails, this message is missing from the activation report.

     

    Pete



  • 3.  Re: ACTIVATE_UC_OBJECT

    Posted May 15, 2018 09:04 AM

    agree with what you said…. but we have a lot of code that was implemented without the checking for a runid..

    So I was hoping we could check the system for a specific system error indicating that it couldn’t start an object…

    but that might not be the case?

     

    thanks

    Ron Gates

     



  • 4.  Re: ACTIVATE_UC_OBJECT

    Posted May 15, 2018 11:18 AM

    I don't believe the failure of this function is recorded anywhere.

     

    One could write a database query against the RT table to identify activation reports that lack U00007000.  But you'd also need to filter out reports belonging to objects that don't have the ACTIVATE_UC_OBJECT() function.  So it would be complex.  But technically doable, with a pretty hefty run-time cost.    (I used to do a lot of SQL work when I was a developer for 20 years and I loved coding challenging solutions.)

     

    But maybe you could try a different approach... use the search tool to find all ACTIVATE_UC_OBJECT() statements, and run an audit of the object names they try to launch to find the bad ones.  Of course this only works with hard-coded target object names.   



  • 5.  Re: ACTIVATE_UC_OBJECT

    Posted May 16, 2018 04:17 PM

    the function returns 0 as runid. This indicates the activation was not possible. One reason could be the object doesn't exist.

    "0" - Activation was not successful.

     

    you can use the GET_OH_IDNR script function to check if the object exists. If the object is not available the function returns 0 which you can catch in an if clause - if you like

     

    Thomas