SAVE_PROCESS
Use the SAVE_PROCESS script function to store a data sequence in the AE database so that other tasks can access it. The function returns a key that identifies the stored data sequence. Use this key together with the RunID of the storing task to load the data sequence in another task. For more information, see LOAD_PROCESS.
Stored data sequences remain available until the statistical records of the tasks that stored them are reorganized. You can load a stored data sequence as many times as needed from any task.
Note: SAVE_PROCESS stores the data sequence but does not close it. You must explicitly close it afterwards. For more information, see :CLOSE_PROCESS.
Syntax
SAVE_PROCESS (Data sequence reference)
Parameters
| Parameter | Description | Format |
|---|---|---|
| Data sequence reference | Reference to the data sequence to store | Script variable |
Return Codes
| Return Value | Condition |
|---|---|
| String | The key under which the data sequence is stored |
Examples
In this example, two Script objects — SCRI.TEST.DS1 and SCRI.TEST.DS2 — run sequentially in a workflow.
SCRI.TEST.DS1 creates a data sequence, stores it to the AE database, and passes the RunID and storage key to the workflow as object variables. For more information, see Defining the Variables Page. The data sequence is then closed.
:SET &HND# = PREP_PROCESS_VAR(VARA.DB)
:PSET &HND_KEY# = SAVE_PROCESS(&HND#)
:PSET &RUNID# = SYS_ACT_ME_NR()
:CLOSE_PROCESS &HND#
SCRI.TEST.DS2 inherits the workflow's object variables, loads the stored data sequence, reads its content, and writes it to the activation report.
:SET &HND# = LOAD_PROCESS(&RUNID#,&HND_KEY#)
:PROCESS &HND#
: SET &LINE# = GET_PROCESS_LINE(&HND#,2)
: P &LINE#
:ENDPROCESS
:CLOSE_PROCESS &HND#
See also: