Automation Engine Script Guide > Ordered by Function > Data Sequences > PREP_PROCESS_VAR_XML

PREP_PROCESS_VAR_XML

Script Function: Use selection criteria in order to retrieve a listShows entities in a grid view of XML Variable objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task values and provide the result for further processing in the form of an internal list (data sequenceAn internal listing of Console outputs or lines of Variable objects, etc. The lines of a data sequence can be accessed by using a PROCESS loop or the script element GET_PROCESS_LINE. The script elements PREP_PROCESS* generate data sequences.).

Syntax

PREP_PROCESS_VAR_XML(Variable, Key, Value)

Syntax

Description/Format

Variable

The name of the Variable object that should be processed.
Format: AE name, script literal or script variable  

Key

The filter for the Key columnColumn in static Variable objects that can be used to access values of a particular line..
Format: scriptA particular Automation Engine object type. literal or script variableA placeholder for a value within a script.

In dynamic variablesA Variable object with the attributes "Source" - "EXEC", "SQL", "SQL internal", "Multi" or "Filelist". Values are directly retrieved from the data source and not stored in the object., the Key column corresponds to the first basic column (value column). The result columnThe first column of dynamic Variable objects with the sources "SQL", "SQL-internal" and "Multi". The content of this column can be defined with Result format. is build only after retrieving the variableIt stores or retrieves values dynamically at runtime. An individual Automation Engine object type. values.

Value

The filter for the value.
Format: script literal or script variable
Format for Variable object XML: XPath (format: string)
You can use a maximum of 64 characters.
Default value: "*"

The wildcard charactersThese are placeholders for characters when you specify filters. ? stands for exactly one character, * for any number of characters. "*" and "?" can be used. "*" stands for any character, "?" for exactly one.

The format for the Variable object XML has to be the same for both script functions.


Return code

Reference to the data sequence of the Variable object.

Comments

This script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… read the values of an XML Variable object. You limit the values that should be read by using the parameters Key and Value. The input is case sensitive.

Value refers to the content of a value column. Column determines the number of the particular value column that should be searched. The first value column is automatically used if you do not define a column. Static variables include 5 value columns. The column number of dynamic variables is not limited and depends on the data source and the settings that are defined in the Variable object.

The script function PREP_PROCESS_VAR_XML may only be used with the Variable object XML, which provides only one value column.

The return codeThe value that represents the result of tasks and script functions. of this script function is a data sequence reference. It is passed on to the script statements :PROCESS and :ENDPROCESS as a start parameter. If you use it in combination with the script function GET_PROCESS_LINE, you can now access each of the Variable object's individual lines.

No error message is output if the Variable object does not include the searched values. The data sequence that is defined between :PROCESS and :ENDPROCESS is not processed in this case.

Names of VARA objects that include a variable must be specified in quotation marks. Otherwise, an error message is displayed.

No new value can be assigned to the script variable that includes the data sequence reference. The data sequence must be discarded by using the script statement CLOSE_PROCESS, and then the variable can be re-used.

Example

In this example, the value of the data sequence lines represented by the script variables &VALUE# and &GB# are read, which in turn read out the values "A/B" of the key called "KEY01" of the Variable object XML, called "VARA.XML":

:SET &HND# = PREP_PROCESS_VAR_XML(VARA.XML, "KEY01", "A/B")
:PROCESS &HND#
: SET &GB# = GET_PROCESS_LINE(&HND#,1)
: SET &VALUE# = GET_PROCESS_LINE(&HND#,2)
: PRINT "&GB# &WERT#"
:ENDPROCESS

 

See also:

Script element Description

:CLOSE_PROCESS

Discards an unnecessary data sequence.

:PROCESS... :TERM_PROCESS... :ENDPROCESS

Loop for the line-by-line processing of a data sequence such as a sequential file or a command result.

GET_PROCESS_LINE

This is used to retrieve content from the current line of a data sequence.

PREP_PROCESS_VAR Use selection criteria in order to retrieve a list of Variable object values and provide the result for further processing in the form of an internal list (data sequence). 

Script Elements - Data Sequences

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