Automation Engine Script Guide > Ordered by Function > System Conditions and Settings > GET_UC_SETTING

GET_UC_SETTING

Script Function: Reads current system settings.

Syntax

GET_UC_SETTING(Setting, Component, Option)

Syntax

Description/Format

Setting

The system setting that should be read.
Format: AE name, script literal or script variable

Allowed values: WORKLOAD_ACTUAL_FT, WORKLOAD_ACTUAL_JOB, WORKLOAD_MAX_FT, WORKLOAD_MAX_JOB, SET_TRACE, SERVER_MODE, SERVER_OPTIONS

WORKLOAD_ACTUAL_FT = The currently used resources that the agentA program that enables the de-centralized execution of processes (such as deployments) on target systems (computers or business solutions) or a service that provides connectivity to a target system (such as for databases or middleware). An agent is also an object type in the Automation Engine. [Formerly called "Executor."] See also: host provides for file transfers.
WORKLOAD_ACTUAL_JOB = The currently used resources that the agent provides for jobs.
WORKLOAD_MAX_FT = The maximum number of resources that the agent provides for file transfers.
WORKLOAD_MAX_JOB = The maximum number of resources that the agent provides for jobs
SET_TRACE = The trace options for the work processes of an AE system .
SERVER_MODE = The type of the server processThe core of the component Automation Engine. Different types are available: communication, work and dialog processes, as well as nonstop processes.
SERVER_OPTIONS = The Server settings.

Component

The componentA component is a single deployable application artifact. As an example, this can be yourfile.war to be deployed into a Tomcat container. Each component has different properties which determine where to get it from, how to configure it, etc. You will need one component per application artifact: e.g., one for the application tier and one for the database backend. whose system setting should be read depending on the parameter Setting.
Format: AE name, scriptA particular Automation Engine object type. literal or script variableA placeholder for a value within a script.

For WORKLOAD_ACTUAL_FT, WORKLOAD_ACTUAL_JOB, WORKLOAD_MAX_FT and WORKLOAD_MAX_JOB: The name of the agent.
For SET_TRACE: The name of the AE system.
For SERVER_MODE: The name of the server process.
For SERVER_OPTIONS: No component is indicated.

Option

The option or statusThis represents the condition of a task (such as active, blocked, generating). of the specified Queue objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task whose value should be read.
Format: AE name, script literal or script variable

You must only specify this parameter if the value of a Queue object should be read (Setting = QUEUE).

Allowed values: ACTIVE_COUNT, CONSIDER_ERT, MAX_SLOTS, PRIORITY, STATE

ACTIVE_COUNT = The number of the currently used queueA particular Automation Engine (AE) object type. In AE, a queue determines the maximum number of concurrent tasks, their priorities and the order in which tasks should be executed. In ARA, queues are containers for workflow executions that should be executed at a certain time one after another. slots.
CONSIDER_ERT = The ERT is considered for exceptions.
MAX_SLOTS = The queue slot maximum.
PRIORITY = The current priority (for exceptions, this value can differ from the default priority).
STATE = The queue's current status.


Return codes

For WORKLOAD_ACTUAL_FT and WORKLOAD_ACTUAL_JOB:
The currently used resources that the agent provides for file transfers and jobs.
UNKNOWN - The resources are not limited.

For WORKLOAD_MAX_FT and WORKLOAD_MAX_JOB:
The maximum number of resources that the agent provides for file transfers and jobs.
UNLIMITED - The resources are not limited.

For SET_TRACE:
The trace options of the work processA part of the component Automation Engine. It is responsible for an Automation Engine system's processes (see also 'Primary work process')..
"0" - No Trace options are specified.

For SERVER_MODE:
"C" - Communication process(CP)
"P" -
Primary work process (PWP)
"W" -
Work process (WP)
"D" -
Dialog process (DWP)
"N" -
NonStop process (NWP)
" " - The server process is inactive.

For SERVER_OPTIONS:
The string that contains the Server options.

For QUEUE - ACTIVE_COUNT:
The number of queue slots that are used.

For QUEUE - CONSIDER_ERT:
"1" - The ERT is considered when tasks start with regard to queue exceptions.
"2" - The ERT is not considered.

For QUEUE - MAX_SLOTS:
The maximum number of queue slots.
"UNLIMITED" - The queue slots are not limited.

For QUEUE - PRIORITY:
The queue's current priority.

For QUEUE - STATE:
"0" = GO
"1" = STOP

Comments

You specify trace options in the System OverviewThe UserInterface window that contains information about the Automation Engine system.'s Server category. The script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… GET_UC_SETTING returns a 16-digit number where each number refers to one of the 16 available areas (such as TCP/IP).

The administrator can define the Server options in the variableIt stores or retrieves values dynamically at runtime. An individual Automation Engine object type. UC_SYSTEM_SETTINGS by using the SERVER_OPTIONS key. GET_UC_SETTING returns the complete string. To read a specific Server option, you can use the script elements MID, SUBSTR or STR_CUT.

GET_UC_SETTING causes all the script's open transactions to be written to the AE databaseA database is an organized collection of data including relevant data structures..

Examples

The following example retrieves the maximum number of resources that the agent WIN01 provides for jobs. The result is written to the activation protocol.

:SET &RET# = GET_UC_SETTING(WORKLOAD_MAX_JOB, "WIN01")
:
PRINT &RET#

The second example reads the trace options of the AE system AEPROD.

:SET &RET# = GET_UC_SETTING(SET_TRACE, "AEPROD")

This example retrieves the type of the Server process AE#WP003.

:SET &RET# = GET_UC_SETTING(SERVER_MODE, "AE#WP003")

The following scripting lines read the third digit of the Server options. This setting defines whether the statistical records should be checked when the system is cold booted.

:SET &RET# = GET_UC_SETTING(SERVER_OPTIONS)
:
SET &OPTION# = SUBSTR(&RET#,3,1)

The next example retrieves a Queue object's current status and writes it to the activation protocol. 

:SET &RET# = GET_UC_SETTING(QUEUE,QUEUE.JOBS,STATE)
:
IF &RET# = 0
: PRINT "QUEUE.JOBS - Status = GO"
:ELSE
: PRINT "QUEUE.JOBS - Status = STOP"
:ENDIF

The last example reads a Queue object's current slot maximum and writes it to the activation protocol.

:SET &RET# = GET_UC_SETTING(QUEUE,QUEUE.JOBS,MAX_SLOTS)
: PRINT "Queue QUEUE.JOBS - Max Slots: &RET#"

 

See also:

Script element Description

:SET_UC_SETTING

Changes the system settings while the system is running.

Script Elements - System Conditions and Settings

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by Function

 


Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support

Copyright © 2016 Automic Software GmbH