CREATE_PROCESS

Use the CREATE_PROCESS script function to create a data sequence. The function returns a reference to the created data sequence and lets you specify whether the sequence is empty or pre-filled with lines from existing data sequences.

Tips: You can also create data sequences with the PREP_PROCESS* script elements. For more information, see Script Elements for Data Sequences.
Use the following script elements to work with data sequences you create: PUT_PROCESS_LINE to add lines, GET_PROCESS_LINE to read lines, and :PROCESS... :TERM_PROCESS... :ENDPROCESS to process the sequence line by line.

Syntax

CREATE_PROCESS (Mode [[, Data sequence1], Data sequence2])

Parameters

Parameter Description Allowed Values
Mode Specifies how the data sequence is created
  • NEW — Creates an empty data sequence
  • JOIN — Combines two existing data sequences
  • DUPLICATE — Copies an existing data sequence
Data sequence reference 1
(Optional)
Reference to the data sequence to combine or duplicate. Required for JOIN and DUPLICATE modes. n.a.
Data sequence reference 2
(Optional)
Reference to the second data sequence to combine with the first. Required for JOIN mode only. n.a.

Examples

The following example creates an empty data sequence and adds two lines with three columns each. The second line is populated with values from a VARA object.

: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#[],)

The following example creates a duplicate of an existing data sequence.

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

: SET &HND2# = CREATE_PROCESS(DUPLICATE,&HND1#)

The following example creates a new data sequence by combining two existing data sequences.

: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: