GET_PROCESS_INFO
Use the GET_PROCESS_INFO script function to retrieve general information, such as the number of columns or lines of data sequences. To do so, you must specify the data sequence to be retrieved and the information to be read.
Important! The specified data sequence must exist. Ensure that it has not yet been closed with a :CLOSE_PROCESS statement. Otherwise, a runtime error will occur. For more information, see :CLOSE_PROCESS.
Syntax
GET_PROCESS_INFO (Data sequence, Information [, Line])
Parameters
| Parameter | Description | Format / Allowed Values |
|---|---|---|
| Data sequence | Defines the data sequence whose information should be read. | Script variable |
| Information |
Defines the type of information to be retrieved:
|
AE name |
| Line |
(Optional) Defines the line whose number of columns should be retrieved. Note: You can only use this parameter when you retrieve the number of columns (Information = COLUMNS). 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. |
A number without quotations, script literal, or script variable |
Return Codes
This script function returns the requested information from the data sequence.
Examples
The following example shows how you create a data sequence filled with the entries of a VARA object. Then, the number of columns is determined per line and printed in 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: