SAVE-LIST Command

The SAVE-LIST command names and saves a select-list that was created with one of the following commands: SELECT, SSELECT, SAMPLE, SSAMPLE, FIND, NSELECT, QSELECT, and FORM-LIST. Once the select-list has been saved, it can be retrieved at any time with the GET-LIST command and used again. The SAVE-LIST command must be entered immediately after you create a select-list.

Format

SAVE-LIST [filename] list-name [list-name]

Parameter(s)

filename

Specifies the pointer-file where the select-list is stored. If filename is not specified, the default is POINTER-FILE.

list-name

Specifies the name of the saved select-list. If list-name is not specified, the default is @.

Description

If you have previously saved a select-list with the same name, the system overwrites the old select-list with the new one without asking for confirmation.

Once a select-list has been saved, it can be retrieved for use by any user from any account.

Saving a Select-list

The following example creates and then saves a select-list containing the item-IDs of inactive customers:

> SELECT CUSTOMERS.INACTIVE

11 ITEMS SELECTED.

> SAVE-LIST INACTIVE

LIST SAVED - 1 FRAME USED

To permanently save the select-list, use the SAVE-LIST command. Once a select-list is saved, you can retrieve it at any time with the GET-LIST command.

A select-list can reference data in any file, not just the file specified in the original SAMPLE statement. If two files have similar items with the same item-IDs, you can create a select-list from one file, then use it to operate on items from the other file.

Selecting a Specified Number of Items

The following example creates a select-list containing the first 4 items in the ORDERS file whose sale date is January 15, 1994:

>SAMPLE ORDERS WITH DATE = "01/15/94" (4)

4 ITEMS SELECTED.

You can list these items with the LIST command:

>LIST ORDERS

 

0179

0134

0234

0156

 

4 ITEMS LISTED.