GET_UC_SETTING
Use the GET_UC_SETTING script function to retrieve current system settings.
Note: This script function writes all open transactions of the script to the AE database. For more information, see Script Processing.
Syntax
GET_UC_SETTING (setting, component, option)
Parameters
| Parameter | Description | Format | Allowed Values |
|---|---|---|---|
| setting |
Specifies the setting to retrieve. |
AE name, script literal or script variable | QUEUE
Queue object settings. SET_TRACE Trace options for the work processes of an AE system. Note: Trace options are specified in the Administration perspective. For more information, see Processes and Utilization and Processes and Utilization. SERVER_MODE Type of server process. For more information, see Processes and Utilization. SERVER_OPTIONS Server settings. Note: Administrators define the server options in the UC_SYSTEM_SETTINGS variable (SERVER_OPTIONS key). For more information, see UC_SYSTEM_SETTINGS - Systemwide Settings. WORKLOAD_ACTUAL_FT Resources currently used provided by the Agent for file transfers. WORKLOAD_ACTUAL_JOB Resources currently used provided by the Agent for Jobs. WORKLOAD_MAX_FT Maximum number of resources provided by the Agent for file transfers. WORKLOAD_MAX_JOB Maximum number of resources provided by the Agent for jobs. |
| component |
Component for which to retrieve the system setting. |
AE name, script literal or script variable |
Specify the desired component name depending on the setting you want to retrieve: Name of the Queue object.Name of the server process for SERVER_MODE. Name of the AE system for SET_TRACE. Specify the Agent name to retrieve the following settings: WORKLOAD_ACTUAL_FT WORKLOAD_ACTUAL_JOB WORKLOAD_MAX_FT WORKLOAD_MAX_JOB. No component is required for SERVER_OPTIONS. |
| option |
(QUEUE or SET_TRACE only) Specifies an option or status to retrieve. |
AE name, script literal or script variable |
Allowed values with QUEUE: ACTIVE_COUNT: Number of queue slots currently in use.CONSIDER_ERT: ERT considered for exceptions. MAX_SLOTS: Queue slot maximum. PRIORITY: The current priority. Note: This value may differ from the default priority if exceptions have been defined in the Queue object. STATE: Current status of the queue (active or stopped). Allowed values with SET_TRACE: MAX_BUFFER_SIZE: Size of memory provided to be written.TRACE_TARGET: Target that traces are written into. SEARCH_KEY: Text to be searched for within the traces. |
Return Codes
The script function has the following returns codes depending on the parameters that you specify.
| Return Value | Condition |
|---|---|
| QUEUE |
ACTIVE_COUNT: Number of queue slots currently in use. CONSIDER_ERT: 0: ERT is not considered. 1: ERT is considered when tasks start with regard to queue exceptions. MAX_SLOTS: Maximum number of queue slots. UNLIMITED: Queue slots are not limited. PRIORITY: Current priority of the Queue. STATE: 0: GO 1: STOP |
| SERVER_MODE | A (for API): Java communication process (JCP) REST. C: Communication process (CP). D: Dialog process (DWP). J: Java work process (JWP). N: Nonstop process. P: Primary work process (PWP). T (for TLS): Java communication process. W: Work process (WP). The system returns a blank if the server process is inactive. |
| SERVER_OPTIONS | Complete string that contains the server options. Tip: Use the script elements MID, SUBSTR or STR_CUT to read a specific server option. For more information, see Script Elements for Editing Strings. |
| SET_TRACE | No option specified:1 to 9: Trace level of the work process. For more information, see Processes and Utilization. 0: Tracing is disabled. TRACE_TARGET:FILE: Traces are written to a file. MEMORY: Traces are written in the memory. MAX_BUFFER_SIZE: Size of memory provided for writing traces (in MB). SEARCH_KEY: Search text. |
| WORKLOAD_ACTUAL_FT
and WORKLOAD_ACTUAL_JOB |
Resources currently used provided by the agent for file transfers and Jobs. UNKNOWN: Resources are not limited. |
| WORKLOAD_MAX_FT
and WORKLOAD_MAX_JOB |
Maximum number of resources provided by the agent for file transfers and Jobs. UNLIMITED: Resources are not limited. |
Examples
-
QUEUE, MAX_SLOTS: The following script reads the maximum number of slots of a Queue object, and writes the value in the activation report.
: SET &RET# = GET_UC_SETTING (QUEUE, QUEUE.JOBS, MAX_SLOTS)
: PRINT "Queue QUEUE.JOBS - Max Slots: &RET#"
-
QUEUE, STATE: The following script retrieves the current status of a Queue object, and writes the status in the activation report.
: SET &RET# = GET_UC_SETTING (QUEUE, QUEUE.JOBS, STATE)
: IF &RET# = 0
: PRINT "QUEUE.JOBS - Status = GO"
:ELSE
: PRINT "QUEUE.JOBS - Status = STOP"
:ENDIF
-
SET_TRACE: The following script reads the trace options of the Automation Engine system AEPROD.
: SET &RET# = GET_UC_SETTING (SET_TRACE, "AEPROD")
-
SET_TRACE, with additional options. The following scripts read trace options for the current AE system.
: SET &TARGET# = GET_UC_SETTING (SET_TRACE, &$SYSTEM#, TRACE_TARGET)
: PRINT "Traces are being written into &TARGET#"
: SET &BUFFER# = GET_UC_SETTING (SET_TRACE, &$SYSTEM#, MAX_BUFFER_SIZE)
: PRINT "The maximum buffer size defined for the memory trace is: &BUFFER#"
: SET &SEARCH# = GET_UC_SETTING (SET_TRACE, &$SYSTEM#, SEARCH_TEXT)
: PRINT "The AE system searches for the following text: &SEARCH#"
-
SERVER_MODE: The following script retrieves the type of the server process AE#WP003.
: SET &RET# = GET_UC_SETTING (SERVER_MODE, "AE#WP003")
-
SERVER_OPTIONS: The following script reads the third digit of the server options. This setting defines whether statistical records are checked when the system is cold booted.
: SET &RET# = GET_UC_SETTING (SERVER_OPTIONS)
: SET &OPTION# = SUBSTR (&RET#, 3, 1)
-
WORKLOAD_MAX_JOB: The following script retrieves the maximum number of resources that Agent WIN01 provides for Jobs, and writes the result in the activation report.
: SET &RET# = GET_UC_SETTING (WORKLOAD_MAX_JOB, "WIN01")
: PRINT &RET#