: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 Considerations
Keep the following rules and limitations in mind:
- You cannot specify dynamic VARA objects because they retrieve their values dynamically and do not store them statically.
- Certain rules and limitations apply to the values of static VARA objects. For more information, see VARA Object Attributes.
- 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().
Syntax
:PUT_VAR_PROCESS VARA object, Data Sequence Reference
Parameters
| Parameter | Description | Format | Allowed Values |
|---|---|---|---|
| VARA object | Name of the static VARA object in which the values should be stored. | AE name or script variable | n.a. |
| Data Sequence Reference |
Refers to the data sequence whose content should be written to the VARA object. You can use the FORCE_VARA_KEY_CI key of the UC_SYSTEM_SETTINGS variable to force context-insensitive read/write actions on STATIC VARA objects while defining the key, see FORCE_VARA_KEY_CI. When the variable is set to Y, the key is converted to and remains in uppercase. |
Script variable | n.a. |
Examples
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: