GET_PROCESS_INFO

Script function: Retrieves information from a data sequence.

Syntax

GET_PROCESS_INFO (Data sequence, Information [ , Row ])

Syntax

Description/Format

Data sequence

The reference to the data sequence whose information 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. For more information, see :PROCESS... :TERM_PROCESS... :ENDPROCESS.
  • 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

Row

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

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 script function is used inside a process loop: Line which is currently accessed by the loop.
  • The script function is used outside a process loop: First line

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.

Important! The specified data sequence must exist, and must not closed by a :CLOSE_PROCESS statement. Otherwise, a runtime error will occur. For more information, see :CLOSE_PROCESS.

Examples

The following example shows the creation of a data sequence that is filled with the entries of a VARA 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: