Skip to main content
Version: 20 R7 BETA

SAVE SET

SAVE SET ( set ; document )

ParameterTypeDescription
setTextName of the set to save
documentTextName of the disk file to which to save the set

Description

SAVE SET saves set to document, a document on disk.

The document does not need to have the same name as the set. If you supply an empty string for document, a Create File dialog box appears so that the user can enter the name of the document. You can load a saved set with the LOAD SET command.

If the user clicks Cancel in the Save File dialog box, or if there is an error during the save operation, the OK system variable is set to 0. Otherwise, it is set to 1.

SAVE SET is often used to save to disk the results of a time-consuming search.

WARNING: Remember that a set is a representation of a selection of records at the moment that the set is created. If the records represented by the set change, the set may no longer be accurate. Therefore, a set saved to disk should represent a group of records that does not change frequently. A number of things can make a set invalid: modifying a record of the set, deleting a record of the set, or changing the criteria that determined the set. Also remember that sets do not save field values.

Example

The following example displays the Save File dialog box, which the user can enter the name of the document that contains the set:

 SAVE SET("SomeSet";"")

System variables and sets

If the user clicks Cancel in the Save File dialog box, or if there is an error during the load operation, the OK system variable is set to 0. Otherwise, it is set to 1.

See also

LOAD SET