PUT_PROCESS_LINE
Use the PUT_PROCESS_LINE script function to add a line to a data sequence. You can specify the reference to the data sequence and the line that should be added. Define the line to be added as a string (script literal or script variable) or as a script array (script variable). Using a string, you can define a delimiter to split it into columns. The line consists of only one column that contains the whole string if you do not use the delimiter. If you specify a script array, it is split automatically into columns according to its elements. Empty array elements at the end are ignored. The data sequence changes immediately; the return code indicates the successful procedure.
Important!
- Ensure that you specify a data sequence that exists and has not been closed with a :CLOSE_PROCESS statement. Otherwise, a runtime error will occur. For more information, see :CLOSE_PROCESS.
- You cannot use this script function to create a new data sequence.
Tip: Create data sequences with the CREATE_PROCESS or PREP_PROCESS* script elements. For more information, see Script Elements for Data Sequences.
Syntax
PUT_PROCESS_LINE (Data sequence, Line [ , Delimiter ])
Parameters
- PUT_PROCESS_LINE
Adds a line to a specific data sequence - Data sequence
Refers to the data sequence to which a line should be added
Format: script variable - Line
Line that should be added to the data sequence. You can also specify a script array.
Format: script variable or script literal - Delimiter
(Optional) Arbitrary character that splits up the specified line to columns.
Format: script variable or script literal
Note: This parameter does not work if you have defined an array for the Line parameter.
Return code
-
0
Data sequence was successfully extended by the specified line.
Examples
The following example creates a data sequence that contains a file list. Then a file name is retrieved from a VARA object and added to the data sequence.
:SET &HND# = PREP_PROCESS_FILENAME("WIN01","C:\AUTOMIC\temp\test*.txt","Y",,)
:SET &LINE# = GET_VAR(VARA.FILELIST)
:SET &RET# = PUT_PROCESS_LINE(&HND#,&LINE#)
See also: