CREATE_PROCESS

ScriptEigener Objekttyp in der Automation Engine function: Creates a new data sequence.

Syntax

CREATE_PROCESS(Mode, [Data sequence reference 1], [Data sequence reference 2])

Syntax

Description/Format

Mode

The mode how the data sequence should be created
Format: AE name

Allowed values:

  • NEW - Create a new empty data sequence
  • JOIN - 2 data sequences combined into 1
  • DUPLICATE - Create a copy of an existing data sequence

Data sequence reference 1

The reference to the data sequence that should either be duplicated or combined (depending on mode).
Format: script variable

This parameter is only required for the JOIN or DUPLICATE Mode.

Data sequence reference 2

The reference to the data sequence that should be combined with data sequence 1.
Format: script variable

This parameter is only required for the JOIN Mode.

Return code

The reference to the newly created data sequence.

Comments

The script function creates a new data sequence and returns its reference as a return code. You use the parameter Mode to specify whether the data sequence is empty or filled with lines from other data sequences.

Data sequences can also be created with the PREP_PROCESS* elements.

To add one or several lines to a data sequence, use the script function PUT_PROCESS_LINE.

Afterwards read the created data sequence using GET_PROCESS_LINE. The line-by-line processing of data sequences can be executed with :PROCESS loops.

Examples

The first example shows the creation an empty data sequence. Afterwards 2 lines each with 3 columns are added.

:SET &HND# = CREATE_PROCESS(NEW)
:SET &LINE1#"Test1,Test2,Test3"
:SET &RET#PUT_PROCESS_LINE(&HND#, &LINE1#, ",")
:DEFINE &LINE2#, string, 3
:FILL &LINE2#[] = GET_VAR(TEST.VAR, KEY1)
:SET &RET#PUT_PROCESS_LINE(&HND#, &LINE2#[],)

In the second example a data sequence is duplicated.

:SET &HND1# = PREP_PROCESS_VAR(VARA.DB,"*WIN*")
:SET &HND2# = CREATE_PROCESS(DUPLICATE,&HND1#)

The last example shows how two data sequences are combined to one.

:SET &HND1# = PREP_PROCESS_VAR(VARA.DB1,"*WIN*")
:SET &HND2# = PREP_PROCESS_VAR(VARA.DB2,,"*JOBS*",1)
:SET &HND#CREATE_PROCESS(JOIN,&HND1#,&HND2#)

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.

GET_PROCESS_LINE

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

PUT_PROCESS_LINE Adds a line to a specific data sequence

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by Function