Michael_Lowry

Get agent group mode

Discussion created by Michael_Lowry on Aug 14, 2018
Latest reply on Aug 14, 2018 by Michael_Lowry

Here is an SEC SQLI VARA that will look up the mode of an agent group.

 

UC4.GET_AGENTGROUP_MODE.VARA_SEC_SQLI

select OHG_Mode
from OH left join OHG
on OH_Idnr = OHG_OH_Idnr
where OH_Name = ?

 

Bind parameters

  1. &$AGENTGROUP#

 

And here is an example of how to use it:

:PRINT "&AGENT_OR_AGENTGROUP# is an agent group. Checking AG mode..."
:SET &AGENTGROUP# = &AGENT_OR_AGENTGROUP#
:SET &AG_Mode# = GET_VAR(UC4.GET_AGENTGROUP_MODE.VARA_SEC_SQLI)
:SWITCH &AG_Mode#
:CASE 'A'
:  SET &AG_Mode_Desc# = "any"
:CASE 'F'
:  SET &AG_Mode_Desc# = "first"
:CASE 'N'
:  SET &AG_Mode_Desc# = "next"
:CASE 'L'
:  SET &AG_Mode_Desc# = "load dependent"
:CASE 'X'
:  SET &AG_Mode_Desc# = "all"
:ENDSWITCH
:PRINT "&AGENT_OR_AGENTGROUP# mode is '&AG_Mode_Desc#' (&AG_Mode#)."

 

Sample output:

U00020408 AE_NODES_BOTH is an agent group. Checking AG mode... U00020408 AE_NODES_BOTH mode is 'all' (X).

Enjoy!

 

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

Outcomes