Automic Workload Automation

Expand all | Collapse all

Get object subtype

  • 1.  Get object subtype

    Posted 02-16-2018 11:59 AM

    Here is an SEC SQLI VARA that will look up the subtype of the currently-executing object.

    UC4.GET_OBJ_SUBTYPE.VARA_SEC_SQLI

    select OH_HostAttrTypeDst
    from OH
    where OH_OType = ?
    and OH_Name = ?

    Bind parameters

    1. &$OBJECT_TYPE#
    2. &$NAME#

    And here is an example of how to use it:

    :PRINT "Object name : &$NAME#"
    :PRINT "Object type : &$OBJECT_TYPE#"
    :SET &OBJ_SUBTYPE# = GET_VAR(UC4.GET_OBJ_SUBTYPE.VARA_SEC_SQLI)
    :PRINT "Object subtype : &OBJ_SUBTYPE#"

     

    Sample output:

    U00020408 Object name    : UC4.GP_SQL.JOBS
    U00020408 Object type    : JOBS
    U00020408 Object subtype : SQL

    Enjoy!

     

    See also: automation_engine/Lookup_Object_Subtype.md at master · michael-lowry/automation_engine · GitHub 



  • 2.  Get object subtype

    Posted 02-19-2018 10:31 AM
    Hello Michael,

    have you thought of a public gibthub repository to store all those includes and sql rather than posting it on the community?

    Regards, Matthias


  • 3.  Get object subtype

    Posted 02-19-2018 10:35 AM
    MatthiasSchelp: Good idea. I’ll look into it.


  • 4.  Get object subtype

    Posted 02-22-2018 05:21 PM
    I copied this object, and instructions for its use, to my Github repository.


  • 5.  Get object subtype

    Posted 02-27-2018 05:18 AM
    :+1:  Looks realy nice next to my Brendan Sapience github repo bookmark.