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
- &$OBJECT_TYPE#
- &$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