Automation Engine Script Guide > Ordered by Function > Data Sequences > PUT_PROCESS_LINE

PUT_PROCESS_LINE

Script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,…: Adds a line to a specific data sequenceAn internal listing of Console outputs or lines of Variable objects, etc. The lines of a data sequence can be accessed by using a PROCESS loop or the script element GET_PROCESS_LINE. The script elements PREP_PROCESS* generate data sequences.

Syntax

PUT_PROCESS_LINE(Data sequence reference, Line, [Delimiter ])

Syntax

Description/Format

Data sequence reference

Reference to the data sequence to which a line should be added.
Format: script variable

Line

Line that should be added to the data sequence
Format: script variableA placeholder for a value within a script. or scriptA particular Automation Engine object type. literal

You can also specify a script array.

Delimiter

Arbitrary character that splits up the specified line to columns.
Format: script variable or script literal

If an array has been specified for line, this parameter has no function

Return code

"0" - Data sequence was succesfully extended by the specified line.

Comments

This script function adds a line to a data sequence. The data sequence is changed directly - the return codeThe value that represents the result of tasks and script functions. only indicates if the procedure ends successful. Specify the reference to the data sequence and the line that should be added.

Data sequences can be created with the script element CREATE_PROCESS or with the PREP_PROCESS* functions.

Make sure that you specify a data sequence that exists or has not been closed with :CLOSE_PROCESS. Otherwise, a runtimeThe duration of a task's execution. It refers to the period between a task's start and end. It does not include its activation period (see also: activation and start). error will occur. You cannot use this script function to create a new data sequence.

The line that should be added can be specified either as a string (script literal or script variable) or as script array (script variable). If you use a string, a delimiter can be specified to split it into clumns. If no delimiter is used, the line consists of only one column that contains the whole string.

If you specify a script array its splitted automatically into columns according to its elements. Note that the empty array elements at the end are ignored.

Examples

Following Example creates a data sequence which contains a file listShows entities in a grid view. Then a file name is retrived from a Variable objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task 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:

Script element Description

:CLOSE_PROCESS

Discards an unnecessary data sequence.

:PROCESS... :TERM_PROCESS... :ENDPROCESS

Loop for line by line processing of a data sequence - a sequential file or a command result, for example.

CREATE_PROCESS Creates a new data sequence.

GET_PROCESS_LINE

Returns the content of the current line of a data sequence.

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by Function

 


Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support

Copyright © 2016 Automic Software GmbH