GET_PROCESS_INFO

ScriptEigener Objekttyp in der Automation Engine function: Retrieves information from a data sequence.

Syntax

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.
Format: script variable

Information

The specific Information that should be retrieved
Format: AE name

Allowed values:

  • INDEX - Current position of the Process loop the data sequence is used in.
  • COLUMNS - Number of columns of the specified line. If no line is specified, the current line (only when used in process loops) or the first line is used.
  • ROWS - Number of rows of the data sequence

Line

The line whose column number should be determined.
Format: A number without quotations, script literal or script variable.

This parameter can only be specified if the number of columns is queried (Information = COLUMNS).

Return code

Information from the data sequence

Comments

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 runtime error will occur.

Examples

The following example shows the creation of a data sequence that is filled with the entries of a VariableSpeichert oder ermittelt Werte dynamisch zur Laufzeit. Auch ein eigener Objekttyp in der Automation Engine. object. Then the number of columns are determined per line and printed to the activation report.

: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

:CLOSE_PROCESS

Discards an unnecessary data sequence.

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

Loop for line by line processing of a data sequence - a sequential file or a command result, for example.

GET_PROCESS_LINE

Returns the content of the current line of a data sequence.

PUT_PROCESS_LINE Adds a line to a certain data sequence

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by Function