Script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,…: Retrieves information from a 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..
GET_PROCESS_INFO(Data sequence reference, Information, [Line ])
Syntax |
Description/Format |
---|---|
Data sequence reference |
The reference to the data sequence whose nformation should be read. |
Information |
The specific Information that should be retrieved Allowed values:
|
Line |
The line whose column number should be determined. This parameter can only be specified if the number of columns is queried (Information = COLUMNS). |
Return code |
---|
Information from the data sequence |
This script function allows you to retrieve general information (such as the number of columns or lines) of data sequences. To do so, you must specify the reference of the data sequence and the information that should be read.
When the number of columns should be read, you can additionally specify the corresponding line. If no line is given the used line depends on the usage of the script element:
The information INDEX stipulates that the function is used inside a process loop. In this case the number of the line is retrieved that is currently processed by the loop.
When reading the number of rows there are no special dependencies.
Note that the specified data sequence must exist and must not closed by the element :CLOSE_PROCESS. Otherwise, a runtimeThe duration of a task's execution. It refers to the period between a task's start and end. It does not include its activation period (see also: activation and start). error will occur.
The following example shows the creation of a data sequence that is filled with the entries of a Variable objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task. Then the number of columns are determined per line and printed to the activation reportA report provides more detailed information about a task's execution or a component..
:SET &HND# = PREP_PROCESS_VAR(VARA.SQL,"*WIN*")
:SET &LNR# = GET_PROCESS_INFO(&HND#, ROWS)
:PROCESS &HND#
:SET &IND# = GET_PROCESS_INFO(&HND#,INDEX)
:SET &COL# = GET_PROCESS_INFO(&HND#,COLUMNS,&IND#)
:PRINT "Line &IND# / &LNR# has &COL# columns"
:ENDPROCESS
:CLOSE_PROCESS &HND#
See also:
Script element | Description |
---|---|
Discards an unnecessary data sequence. |
|
Loop for line by line processing of a data sequence - a sequential file or a command result, for example. |
|
Returns the content of the current line of a data sequence. |
|
PUT_PROCESS_LINE | Adds a line to a certain 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 |