User Guide > Objects > Alphabetical Listing > Variable Tab

 Variable Tab

The Variable tab is object-type specific and is only available in Variable objects. Depending on the variable's source, you can either define values manually (static variables) or configure values that will be retrieved dynamically.

Object: Variable
Object class:
Active object
Object type (short name):
VARA

General Information

The Variable tab's contents depends on the source that was determined when the Variable object was created. You cannot change this source at a later point. Variable values can dynamically be selected from a databaseA database is an organized collection of data including relevant data structures. (SQL), from other Variable objects (Multi), or from an agent computer's directory (Filelist) in the form of a file list. The corresponding settings are provided in the variable tab. On this tab, you can also manually enter values for static variables.

Static variables include one key and five value columns. The number of columns that is used in dynamic variables depends on the data source and is not limited.

An exception is the static Variable object of the type XML. It contains one value column only, which may contain only well-formed XML structures.

The following script elements can be used to handle contents:

Use the script function PREP_PROCESS_VAR to access all or several particular entries of a variable. This prepares the processing of a data sequence.

For certain dynamic variables, you can use PromptSet variables in particular fields of the variable tab. The PromptSet variables column lists the fields in which you can do so (the table below that shows the field descriptions).
Using these is necessary for creating dynamic PromptSet dialogs

Only PromptSet variables are supported in the variable tab fields (script, object, and predefined variables are not allowed). Keep this in mind when you use the supplied Template objects of Backend variables, as their fields by default include the names of PromptSet variables.

Note that when you use database variables (SQL, SQL SECURE, SQLI, and SQLI SECURE types), binary fields are not supported. Binary data that is the result of an SQL query will cause an error in the preview or when the values are retrieved at runtime.

Note that in database variables (SQL, SQLI, SQL SECURE, SQL SECURE types), the system will not check the SQL statements that are processed for technical reasons. This also means that you can change or delete data records by using Variable objects. For security reasons, Automic recommends restricting user access accordingly. If possible, deploy a database user with read-only rights for variables that access an external database (SQL, SQL SECURE). For internal SQL variables (SQLI, SQLI SECURE), you can limit object access via a privilege (create and modify SQL-internal variables).

Depending on the data type, SQL and SQLI variables return the value "" (string, date, time, timestamp) or 0 (number) for NULL values.


Static

For static variables (source setting - static), you can either enter the values for the variable tab manually or by using the script elements :PUT_VAR or :PUT_VAR_COL. Each table line entry is composed of a key plus 5 values and depends on what has been specified in the Attributes tab.

Note that the key must not start with a & character. Otherwise, you can save the Variable object but an error will occur when an attempt is made to access these lines via script.

A key can include a maximum of 200 characters.

The settings "Data type" and "Output format"(Attributes tab) only refer to the first value column. The data type "Text" is used for all other value columns.

The following value ranges are allowed depending on the selected data type:

Data Type

Content Length

String

Unlimited

If the setting "Text limiting" is selected ("Attributes"tab), this restriction only affects the first value column. 

Number

Between 0 and 2147483647.

Timestamp

Date and time value depending on the output format.

Time Time value depending on the output format.
Date Date value depending on the output format.

Use the Search function to find Variable objects, keys and values.

The values are sorted according to the settings that have been made in the Attributes tab. By default, the Key column is sorted in an ascending order.

Cell Editor

An editor is available for the value columns of static VARA objects. This provides simple and user-friendly content editing. The editor is helpful particularly for changing long values.

To open the editor, click in a value column cell. A pencil icon will appear at the right edge of the cell; click this icon to open the editor.
You also may press the keyboard keys "SHIFT+F2" to open the cell editor window.

 

The editor contains the following functions, which are available via the Editor toolbar or the context menu:


XML

The Variable object XML is a special type of the static Variable objects. Although a static object by definition it contains one value column instead of five. In addition, the data type that may be used with it, are well-formed XML structures only. It may be used to temporarily store complex data as XML structure in the Automation Engine system. This data then my be referenced and used in PromptSet objects, in Script objects and other script contexts system-wide.

If you try to use other data types than XML or incomplete XML structures with this object, an error message will be displayed.

The use of XPath expressions with the Variable object XML is possible, as described also in the individual sections of the relevant script functions. Depending on the database the Automation Engine system is being used with, individual XPath expressions may work differently. In such cases please check with the database's vendor.

If you use the Automation Engine with an Oracle database, the attribute values of XML data used in this Variable object should not contain more than 4000 characters.

XML data can use only character encoding which is compatible with the character encoding in the database connection.

Field/Element

Description

PromptSet variables
Settings    
Key The key for the XML data structure entered in the "Value" field. You may set an individual key.
Value The data to be stored and used in XML format.

In order to edit the XML data, you may use the cell editor, which may be opened by clicking the pencil symbol, when the "Value" cell is activated by a mouse-click, as shown below. For details on the cell editor and its use see the "Static" category above.

 


EXEC

The dynamic variable EXEC can be used as an intermediary, carrying out a readout of return values of executed objects, which may affect the subsequent execution of objects or trigger the execution of objects. As a user, you can store these readouts in the script variables defined in EXEC. EXEC itself has no input parameters.

You can use the dynamic Variable object EXEC in order to read and pass on the values of another executable object. In this case, the parameters in the dynamic Variable object EXEC must use the same names as are used in the PromptSet of the executable object that supplies the return codes.

Field/Element

Description

PromptSet Variables

Executable Object

The name of the Automation Engine object.

The following object types are recommended for use with VARA.EXEC:

  • Job, Script, FileTransfer Job, Event, Remote Task Manager, Workflow, Group, Notification

The following executable object types should not be used with VARA.EXEC: Schedule, Cockpit.

Note that at this stage in the executable object itself no check is performed, if the right object type has been selected. An error message will be displayed as soon as the object is executed.

 
Result Variable

The name of the script variable that is used for the return value of the executable object.

 
Parameters

List of parameters and variables that are available in the executable object. Their values can be either

  • Direct values, for example 5342
  • Reference variables, for example &reftext#

You must treat these parameters as though they were PromptSet/read buffer values. When VARA object calls the executable object, it uses :PUT_PROMPT_BUFFER to set the specified parameters. This means that in order to read and use these values in the called executable object, you must do one of the following:

  1. Create a PromptSet on the called executable object with variables with the same names as the parameters set in the calling EXEC Variable object.
  2. Use the :READ command to read in the values of variables of the same names as the parameters set in the calling EXEC Variable object.

It is not sufficient merely to define the variables on the Variables & Prompts tab for the called executable object.

Preview Pressing this button will show a preview of the result values stored or transferred.  

SQL

Variable values that use SQL source are loaded from an external database using SQL statements. In this case, the AE system's database cannot be used.
The variable source "SQL - internal" can be specified to make use of the AE database.

Note that SQL variables require the database agent to be individually configured and started. Consequently, this cannot be used to execute database jobs and events. Related information is included in the Installation Guide for database agents.

To change the maximum time taken for resolving SQL variables, use the setting VAR_TIMEOUT (UC_HOSTCHAR*).

There is no limit to the lengths of values. If a maximum text limit has been selected in the "Attributes" tab, this only applies to the first value column. Items exceeding this limit will be excluded.

Non-printable characters will be deleted automatically (ASCII characters 0x00 to 0x20 and 0x7F).

The maximum number of lines that is returned is specified in the setting SQLVAR_MAX_ROWSof the variable UC_SYSTEM_SETTINGS. 

The Automation Engine does not truncate trailing space characters from the end SQL variable values.

Field/Element

Description

PromptSet Variables

Database connection

 

 

Connection

The database-type Connection object that contains the connection parameters for the required database.

Login

The Login object that stores the name of the database user and the corresponding passwordA secret combination of characters for a Automation Engine user..

The login data for accessing the database is retrieved from the Connection object if you neither specify a Login object nor set the option Apply User's default Login. An error occurs if the variable should be resolved and this object does not include any login information.

Apply user's default login

You can also select a Login object for SQL variables in User objects (default login). With the option Apply user's login activated, the Login object that has been assigned to the current user is applied. The Login object that is specified in the variable is ignored in this case. An error occurs if the variable is accessed and no login is defined in the User object.

 
SQL    
SQL statement

Text field for specifying SQL statements. These SQL statements are used to select data records in the database and supply them as variable values.

For example: select * from col

Note that all SQL statements are allowed in this text field. You can even change or delete database entries.

AE does not verify whether these SQL commands include errors or are harmful. They are passed on to the database without being verified. This means that an execution error can only occur during database access, which is when the variables are being resolved.

Note that you must used the setting VAR_SECURITY_LEVEL(UC_SYSTEM_SETTINGS) in the SQL statements if you usepredefined variables or other Variable objects. Otherwise, no value replacement takes place (default) and a database error occurs.

Maximum length: 4096 characters

Result Format

Definition of the result column's contents.

The first column that is displayed in the preview is the result column. The other columns include the individual values of the database columns that have been returned by the SQL query. The result column can show a combination of value columns and any characters. This is defined via the Result Format.

Column numbers that were specified using {} curly brackets in the Result Format field will be replaced by the value of the corresponding column.

For example:
Value column 1: JOB1
Value column 2: WIN01
Return Format: {1}_{2}
Result column: JOB01_WIN01

The result column corresponds to the first value column if no Result format is specified.

The limitations for variables (min. value, max. value, limit text to) do not affect the result column but the first returned column. If the value of this column exceeds the allowed range, the line is skipped and is not available via the Variable object.


 
Preview

This executes the SQL statements and displays the result in a new window. In doing so, the SQL statements are checked and possible errors can be identified (for example, the data type of the Variable object and of the database do not match).

The database agent sends the preview data to the Automation Engine in the form of a message. An error occurs if this message exceeds the maximum message length that a server process accepts (see parameter MaxMsgSize= in the AutomationEngine's INI file, default value: 3145 728 Bytes). In this case, you can limit the result either by using a maximum number of lines or through SQL statements.

 

SQL Secure

SQL SECURE is similar to the variable type SQL as it also runs SQL statements on an external database. As opposed to SQL, you can use all supported variables within SQL statements without putting the database at risk of an SQL injection. The variables are replaced regardless of the setting VAR_SECURITY_LEVEL (UC_SYSTEM_SETTINGS).

You cannot directly specify the variables in the field SQL Statement, but you can include them using bind parameters. These bind parameters are maintained in the related tables and can include predefined variables, placeholders for VARA objects, and PromptSet variables. In the SQL script, use the "?" character in the locations where the bind parameters will be inserted.

For technical reasons, the system cannot check whether only SELECT commands are used in the variable's SQL. To prevent that SQL commands other that SELECT are run, Automic recommends deploying a database user who has read-only access rights.

This special behavior for replacing variables only applies to the SQL statements. To use PromptSet variables in the fields Connection and Login, you still require the setting VAR_SECURITY_LEVEL = 3.

This variable type also requires a database agent that was started in DB service mode and that is version v9 SP3 or later. Older agents do not support the variable type SQL SECURE. The maximum number of returned lines is defined in the variable UC_SYSTEM_SETTINGS, setting: SQLVAR_MAX_ROWS.

Field / Element

Description

PromptSet Variables

Database connection

 

 

Connection

The database-type Connection object that contains the connection parameters for the selected database.

Login

The Login object that stores the name of the database user and the corresponding password.

The login data for accessing the database is retrieved from the Connection object if you neither specify a Login object nor set the option Apply user's default login. An error occurs if the variable is to be resolved and this object does not include any login information.

Apply user's default login

You can also select a Login object for SQL variables in User objects (default login). With the option Apply user's login activated, the Login object that has been assigned to the current user is applied. The Login object that is specified in the variable is ignored in this case. An error occurs if the variable is accessed and no login is defined in the User object.

 
SQL query    
SQL statement

The SQL statements used to select specific database entries that serve as variable values.

Variables that are directly specified in SQL will not be replaced. To include variables, use bind parameters.

Maximum length: 4096 characters

Bind parameters

The table that contains the bind parameters.

Use bind parameters in order to insert variable values within SQL statements. You can use predefined variables, PromptSet variables, and placeholders for VARA objects for the entries of this table. Each line represents one bind parameter.

You use bind parameters in order to insert variable values within SQL statements. You can use script variables, object variables, predefined variables, and placeholders for VARA objects that you enter in this table. Each line represents one bind parameter.

The variable VAR_SECURITY_LEVEL (UC_SYSTEM_SETTINGS) does not impose any limitations.

In the SQL statements, you must use a "?" character at every location where the replaced value of a bind parameter is to be inserted. A bind parameter must exist for each "?". Make sure that you maintain the correct order (table). Note that you cannot use bind parameters multiple times.

No values will be replaced if a specified variable does not exist. In this case, the variable name is used, which can cause an error when the variable is to be resolved.

The parameters are automatically numbered and cannot be changed. To remove individual bind parameters, highlight them and press the DEL key.

You can use variable names as bind parameters, with any values of your choice.

The following field data types and input formats are supported for bind parameters:

  • Date: yyyy-mm-dd
  • Time: hh:mm:ss
  • Timestamp: yyyy-mm-dd hh:mm:ss
  • String: any string
  • Boolean: possible values: 0 / 1 or true / false
  • Number: no thousand separator, a decimal point as a decimal separator

Other field types of the database and other formats are not supported. Data types are not converted (no conversion from timestamp to date). Inserting an invalid value causes an error when the SQL commands are processed.

 
Result Format

The definition of the result column's contents.

The first column that is displayed in the preview is the result column. The other columns include the individual values of the database columns that have been returned by the SQL query. The result column can show a combination of value columns and any characters. This is defined via the Result Format.

Column numbers that were specified using {} curly brackets in the Result Format field will be replaced by the value of the corresponding column.

For example:
Value column 1: JOB1
Value column 2: WIN01
Return Format: {1}_{2}
Result column: JOB01_WIN01

The result column corresponds to the first value column if no Result format is specified.

The limitations for variables (min. value, max. value, limit text to) do not affect the result column but the first returned column. If the value of this column exceeds the allowed range, the line is skipped and is not available via the Variable object.

 
Preview

This executes the SQL statements and displays the result in a new window. In doing so, the SQL statements are checked and possible errors can be identified (for example, the data type of the Variable object and of the database do not match).

The database agent sends the preview data to the Automation Engine in the form of a message. An error occurs if this message exceeds the maximum message length that a server process accepts (see parameter MaxMsgSize= in the AutomationEngine's INI file, default value: 3145 728 Bytes). In this case, you can limit the result either by using a maximum number of lines or through SQL statements.

 

SQL Internal

If a variable's source is "SQL - internal", its values are retrieved from the AE database via SQL statements. It is not necessary to specify a connection or a login because the database access remains internal.

The administrator can activate this function by using the setting SQLVAR_INTERNAL in the variable UC_SYSTEM_SETTINGS. The user privilege "Create and modify SQL- internal variables" is also required.

There is no limit to the length of values. If a maximum text limit has been selected in the "Attributes" tab, this only applies to the first value column. Items exceeding this limit will be excluded.

The maximum number of lines that is returned is specified in the setting SQLVAR_MAX_ROWS of the variable UC_SYSTEM_SETTINGS. 

A conversion error that occurs while running SQL commands on MS SQL server databases can cause a deadlock or an inconsistent transaction (with an unforeseen result). Automic recommends verifying the commands in SQLI variables of users very carefully because the Automation Engine cannot intercept such an error for technical reasons.

Field/Element

Description

PromptSet Variables
SQL    
SQL statement

The text field for specifying SQL statements. These SQL statements are used to determine the AE database's data records that are used as variable values.

For example: select * from OH

Select the type of AE database you use in order to be able to execute SQL commands: MS SQL, Oracle or DB2. The SQL statements remain stored for each database type.

Note that SQL statements are not checked. You can even change or delete database entries.

AE does not verify whether these SQL commands include errors or are dangerous. They are passed on to the database without being verified. This means that an execution error will only occur during database access, which is when the variables are being resolved.

Note that usingpredefined variables or other Variable objects requires you to specify the setting VAR_SECURITY_LEVEL (UC_SYSTEM_SETTINGS) in the SQL statements accordingly. Otherwise, the variables are not replaced (standard) and a database error occurs.

Maximum length: 4096 characters

Result Format

The definition of the result column's contents.

The first column that is displayed in the preview is the result column. The other columns include the individual values of the database columns which have been returned by the SQL query. The result column can show a combination of value columns and any characters. This is defined via the Result Format.

Column numbers that were specified by using { } curly brackets in the field Result Format will be replaced by the value of the corresponding column.

For example:
Value column 1: JOB1
Value column 2: WIN01
Result Format: {1}_{2}
Result column: JOB01_WIN01

The result column corresponds to the first value column if no Result format is specified.

The limitations for variables (min. value, max. value, limit text to) do not affect the result column but the first returned column. If the values of this column exceed the maximum range, this line is skipped and is not available via the Variable object.


 
Preview

This executes the SQL statements and displays the result in a new window. In doing so, the SQL statements can be checked and other errors be identified (for example, the data type of the Variable object and of the database do not match).

 

SQL Internal Secure

This variable type fulfills the same function as "SQL - internal", with the difference being that variables can always be inserted in the SQL statements - regardless of the setting VAR_SECURITY_LEVEL - UC_SYSTEM_SETTINGS. To include variables in the SQL, you need to use bind parameters. In doing so, you cannot compose SQL statements, and this protects the database from the risk of an SQL injection.

As in "SQLI internal", the variable values are directly retrieved from the AE database. This means that you do not need a database agent.

SQLI SECURE variables are bound to the setting SQLVAR_INTERNAL in the variable UC_SYSTEM_SETTINGS and to the privilege "Create and modify SQL-internal variables".

For technical reasons, the system cannot check whether only SELECT commands are used in the variable's SQL.

To determine the maximum number of returned lines, use the settingSQLVAR_MAX_ROWSin the variable UC_SYSTEM_SETTINGS.

Field / Element

Description

PromptSet Variables
SQL    
SQL Query

The SQL statements used to select specific database entries that serve as variable values.

Variables that are directly specified in SQL will not be replaced. To include variables, use bind parameters.

Maximum length: 4096 characters

 
Bind-Parameter

The table that contains the bind parameters.

You use bind parameters in order to insert variable values within SQL statements. You can use script variables, object variables, predefined variables, and placeholders for VARA objects that you enter in this table. Each line represents one bind parameter.

The variable VAR_SECURITY_LEVEL (UC_SYSTEM_SETTINGS) does not impose any limitations.

In the SQL statements, you must use a "?" character at every location where the replaced value of a bind parameter is to be inserted. A bind parameter must exist for each "?". Make sure that you maintain the correct order (table). Note that you cannot use bind parameters multiple times.

No values will be replaced if a specified variable does not exist. In this case, the variable name is used, which can cause an error when the variable is to be resolved.

The parameters are numbered automatically and cannot be changed. To remove individual bind parameters, highlight them and press the DEL key.

You can use variable names as bind parameters, with any values of your choice.

The following field data types and input formats are supported for bind parameters:

  • Date: yyyy-mm-dd
  • Time: hh:mm:ss
  • Timestamp: yyyy-mm-dd hh:mm:ss
  • String: any string
  • Boolean: possible values: 0 / 1 or true / false
  • Number: no thousand separator, a decimal point as a decimal separator

Other field types of the database and other formats are not supported. Data types are not converted (no conversion from timestamp to date). Inserting an invalid value causes an error when the SQL commands are processed.

Result Format

The definition of the result column's contents.

The first column that is displayed in the preview is the result column. The other columns include the individual values of the database columns which have been returned by the SQL query. The result column can show a combination of value columns and any characters. This is defined via the Result Format.

Column numbers that were specified by using { } curly brackets in the field Result Format will be replaced by the value of the corresponding column.

For example:
Value column 1: JOB1
Value column 2: WIN01
Result Format: {1}_{2}
Result column: JOB01_WIN01

The result column corresponds to the first value column if no Result format is specified.

The limitations for variables (min. value, max. value, limit text to) do not affect the result column but the first returned column. If the values of this column exceed the maximum range, this line is skipped and is not available via the Variable object.

 
Preview

This executes the SQL statements and displays the result in a new window. In doing so, the SQL statements are checked and possible errors can be identified (for example, the data type of the Variable object and of the database do not match).

 

Multi

Variables that use the "Multi" source setting obtain a combination of values from two other Variable objects. Use the variable tab to define the source variable and the type of value calculation.

Field/Element

Description

Variable 1
Variable 2

Definition of the two Variable objects that serve as values sources.

Variable 1 determines the number of columns. The reference columns' values of both variables are combined depending on the operation that has been specified. The reference column depends on the variable source: Key column (in static variables), first value column (variable source: SQL, SQL-internally, Multi), or the Filelist column (variable source: Filelist). Columns that are not included in Variable 2 do not include a value for the corresponding entries.

The values of Variable 1 are used if two Variable objects contain entries of the same name.

Note that the data type of the source variable's reference column should match the Multi variable's data type. Otherwise, an error occurs or the values are not available.

Preview This retrieves the variable values, executes the specified operation, and displays the result in a new window.
Result Format

Definition of the result column's contents.

The first column that is displayed in the preview is the result column. The result column can show a combination of value columns and any other characters. This is defined via the Result Format.

Column numbers that were specified using curly brackets {} in the Result Format field will be replaced by the value of the corresponding column.

For example:
Value column 1: JOB1
Value column 2: WIN01
Result Format: {1}_{2}
Result column: JOB01_WIN01

Without a Result Format being specified, the value of the variable's Result or Key column is assumed.

The values of the result column have to comply with the variable's limitations (min. value, max. value, limit text to), the output format, or the data type. Otherwise, the result column does not include a value.

Operation  
Set union This retrieves all values of the Variables 1 and 2. If the variable entries are identical, the values of Variable 1 are used.
Intersection This retrieves the values that are used in Variable 1 and in Variable 2. If the values are identical, the Result/Key column entries of Variable 1 are used.
Difference All values of Variable 1 that are not contained in Variable 2. The Result/Key column entries of the variables are compared to each other.

Filelist

Selecting Filelist as the source means that the Variable object obtains the file names of a particular directory as its values. Doing so requires an OS agent to be specified. On Windows agents, the file names are sorted in ascending order. On UNIX agents,the file names are unsorted.

Variables that use Filelist as their source only contain one column (as opposed to SQL, SQL-internal and Multi). Keep this in mind when using the script element GET_PROCESS_LINE. There is no result column.

Field/Element

Description

PromptSet variables
Directory

The directory whose file names should be returned as a value list when the Variable object is accessed. This directory must be available on the specified host.

Example for a Windows computer:


C:\temp

You can also limit the list to files with a particular name or suffix. To set such filters, use wildcard characters: * stands for several characters, ? for exactly one character.

For example:
C:\AUTOMIC\utility\temp\*.txt

Preview The preview can be used to check the settings for fields (directory does not exist, host is not available, no read access to the path). If there are no problems, the file list will be displayed in a new window.  
Source Host (-Filelist)    
Host

The OS agent that is used to access the specified directory. You cannot select an agent group.
The system automatically uses the agent of the task that triggers the variable access (in file transfers: the source host) if no host has been selected.

A runtime error occurs if the variable is used in an object which no agent or login has been assigned to.

FileTransfer object as source: If you do not assign a host to the Variable, the host of the FileTransfer object's target system will be used.

Apply task's host

With this option activated, the agent of the task that accesses the Variable object is used.


 
Login The Login object for logging in to the host. Without this, the system automatically uses the Login object of the task that accesses the variable.
Apply task's login This setting means that the system uses the Login object of the task in which the variable is used.  

Backend

Backend-type variables execute a command on an operating system and supply the result in the form of values that are shown in columns. The Variable object defines how the columns are split. You can enter several commands for various operating systems, system names, and versions in a variable. The correct command of the agent in question is automatically selected and executed when the variable is resolved.

To access the source computer, you must select an agent and a Login object (identical procedure as for the Filelist variable type).

The operating systems UNIX and Windows are supported. You can select the OS in the corresponding tabs (below the Command table).

The privilege "Create and modify Backend variables" is required in order to create and modify BACKEND-type VARA objects.

The return code is automatically set to 1 if a Windows command results in an error. This means that when you use the VARA object within a script, the script will abort. In order to avoid this, you can append " & set ERRORLEVEL=0" at the end of the Windows command.
For example: cmd /c dir /b /o:d C:\temp\*.xml & set ERRORLEVEL=0
This command lists the files of a directory. The return code is always 0 regardless of whether files are found or not. In doing so, you can ensure that the tasks using this variable will not abort.

Note that the settings VAR_TIMEOUT (UC_HOSTCHAR_DEFAULT) and BACKENDVAR_MAX_ROWS (UC_SYSTEM_SETTINGS) are also available for Backend-type variables.

Field / Element

Description

PromptSet variables
Host    
Host

The agent on whose computer the command is to be executed.

Apply task Host

This setting deploys the agent of the task accessing the Variable object.

The task's agent is preferred if this option is set. The variable's agent (see Host) is used if the task does not include an agent (such as in Script objects). An error occurs if the variable is to be resolved and neither the task nor the variable includes an agent.

 
Login The Login object for logging in to the agent computer.
Apply task Login

This setting deploys the login of the task using the variable.

The task's Login object is preferred if this option is set. The variable's login (see "Login") is used if the task does not include a Login object (such as in Script objects). An error occurs if the variable is to be resolved and neither the task nor the variable includes a Login object.

 
Command

Table for the definition of commands per operating system.

In Windows, these are not batch lines. This means that you must define a specific program to be executed. 

Examples:
Listing the directory: cmd /c dir C:\temp
Ping: ping localhost -n 10

You can store the commands for several operating systems within the same variable. They system automatically uses the OS commands of the relevant agent when the variables are resolved.

In the columns OS Name and Version, you can filter for the names (such as a particular UNIX derivative) and OS version. The suitable line for the specified agent is automatically used when the variable is executed.

The first entry that matches the OS, OS name, and version of the agent is used.

Note that Backend-type variables execute exactly one command.

UNIX: The user who is specified in the Login object must have the right to execute the corresponding command. Linux: Root rights are required for the chkconfig and runlevel commands.

 
OS name

Filters for the name of the operating system.

You can also use the wildcard character *. This serves as a placeholder for any number of characters.

The OS name refers to the agent's OS name that is shown in the System Overview -> Agents -> SW column.

 
Version

Filters for the OS version.

Version refers to the agent's OS version that is shown in the System Overview -> Agents -> SW version column.

 
Command

OS command.

Windows only supports PowerShell commands.

 
Columns

Definition of how the result should be split into columns.

Syntax:
column name:start position(length) [;column name:start position(length)  . . .] 

Column name: Name of the column, user-defined
Start position: Position of the character where the column starts.
Length: Number of characters that determines the column's size.

Semicolons (;) must only be used between several columns. They are not required at the end of the complete definition.

You must define at least one value column (minimum requirement).

For example:
process:1(20);pid:25(10)

The above example splits the command's output into two columns:
The process column starts with the first character and has a length of 20 characters. "pid" starts at character 25 and is 10 characters long.

 
     
Result format

Definition of the result column's contents.

The first column that is displayed in the preview is the result column. It can be composed of value columns and any characters (to be determined in the Result Format).

Column numbers that are specified in curly brackets { } in the Result Format field are replaced by the value of the relevant column.

For example:
Value column 1: JOB1
Value column 2: WIN01
Result format: {1}_{2}
Result column: JOB01_WIN01

The result column matches the first Value column if you do not specify a Result format.

The result column's values must be within the variable's limits (min. value, limit text to) or match the data type. Otherwise, the result column does not obtain a value.

 
Preview This runs the relevant command on the defined computer and displays the result in a separate window.  

Predefined BACKEND-type  Variable objects are supplied in client 0 (UC _RB_VARIABLES folder):

Object name Operating System Function Columns
UC_RB_VARA_PROCESSLIST Windows, Linux, AIX, SunOS, HP-UX

Lists the active processes.

The maximum ProcessID length may differ depending on the UNIX system used. Adjust the column length in the Variable object if necessary.

ProcessID
Process name
UC_RB_VARA_SERVICES_PAUSED Windows, Linux, AIX, SunOS, HP-UX Lists all paused services. Service name
UC_RB_VARA_SERVICES_RUNNING Windows, Linux, AIX, SunOS, HP-UX Lists all started services. Service name
UC_RB_VARA_SERVICES_STOPPED Windows, Linux, AIX, SunOS, HP-UX Lists all stopped services. Service name
UC_RB_VARA_USERLIST Windows, Linux, AIX, SunOS, HP-UX

Lists all OS users.

Windows: Active Directory for PowerShell must be installed on the relevant computer.

User (account) name

These Variable objects can be used for dynamic PromptSet elements. Their specified agent is the variable name &AGENT#, and their login is &LOGIN#. Ensure that you use these names for the PromptSet variables of the required elements.

In PromptSet objects, you can select the predefined Variable objects directly as reference variables. It is not necessary to create them in their clients beforehand.

Variable objects include the options Apply task Host / Apply task Login and use the agent / login of the task (if available) to which the PromptSet object is assigned.

The above table also shows the operating systems for which commands are specified in the variable. The correct command is executed depending on the agent and its OS.

 

 

Also see: