WRITELIST
Synopsis
WRITELIST dynarray ON listname [SETTING var] WRITELIST dynarray TO listname [SETTING var]
Arguments
dynarray | A select list supplied by the SELECT statement. A dynamic array of elements separated by field mark delimiters. |
listname | A name assigned to the saved select list. |
SETTING var | Optional — a local variable used to receive a numeric error code if the operation fails. |
Description
The WRITELIST statement saves a select list. Once you have saved a select list, you can use GETLIST to activate the saved select list so that it can be read by READNEXT.
The listname select list is saved in the &SAVEDLISTS& file. Caché stores this file using the ^SAVEDLISTS global.
You can use either the ON or TO keyword. The ON keyword is preferred; the TO keyword is provided for jBASE compatibility.
The optional SETTING clause is executed if the WRITELIST operation fails and an error code is generated. The var variable is set to this numeric error code. The SETTING clause is provided for jBASE compatibility.
Emulation
In jBASE emulation, if listname is 0 or "", WRITELIST creates a new select list 0, saves to select list 0, and makes this select list active. Caché and other emulations create select list 0 and save to select list 0, but do not retain it as an active select list.
See Also
-
DELETELIST statement
-
SELECT statement