Michael_Lowry

Get object subtype

Discussion created by Michael_Lowry on Feb 16, 2018
Latest reply on Feb 27, 2018 by MatthiasSchelp

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 

Outcomes