:PUT_VAR_PROCESS
Use the :PUT_VAR_PROCESS script statement to fill a static VARA object with the content of a data sequence. Static VARA objects include six columns in total; the Key column plus five Value columns. The :PUT_VAR_PROCESS script statement fills these columns with the first six columns of the data sequence. Therefore, they are ignored if the data sequence includes more than six columns. The :PUT_VAR_PROCESS script statement removes all entries of the VARA object before re-filling it. The result is that the VARA object will include the exact entries of the data sequence once you have successfully run this script statement.
Important!
- You cannot specify dynamic VARA objects because they retrieve their values dynamically and do not store them statically.
- Note that certain rules and limitations apply to the values of static VARA objects. For more information, see VARA Object Attributes.
Syntax
:PUT_VAR_PROCESS VARA object, Data Sequence Reference
Parameters
- :PUT_VAR_PROCESS
Writes the content of a data sequence to a static VARA object - VARA object
Name of the static VARA object in which the values should be stored
Format: AE name or script variable - Data Sequence Reference
Refers to the data sequence whose content should be written to the VARA object
Format: script variable
Note: If :PUT_VAR_PROCESS tries to write in variable values that are not accepted because they duplicate a key, or if there is only one accepted entry, it returns the error number 20683 through sys_last_err_nr() and the location of the error through sys_last_err_ins().
Example
The following example writes 1000 lines with PUT_VAR_PROCESS:
:SET&HND# = PREP_PROCESS_VAR("VARA.PUT_VAR_PROCESS")
:SET &CNT# = 0
:WHILE &CNT# < 1000
: SET &CNT# = &CNT# + 1
: SET &KEY# = "KEY&CNT#"
: SET &COL1# = "COL1-&CNT#"
: SET &COL2# = "COL2-&CNT#"
: SET &COL3# = "COL3-&CNT#"
: SET &COL4# = "COL4-&CNT#"
: SET &COL5# = "COL5-&CNT#"
: SET &LINE# = "&KEY#§§§&COL1#§§§&COL2#§§§&COL3#§§§&COL4#§§§5"
: SET &RET# = PUT_PROCESS_LINE(&HND#, "&LINE#")
:ENDWHILE
:PUT_VAR_PROCESS"VARA.PUT_VAR_PROCESS",&HND#
:CLOSE_PROCESS&HND#
See also: