Restore

PURPOSE:  The RESTORE command establishes a previously saved Find Subset (FS) object as the current FS.

Syntax

RESTORE FS name

FS name

specifies the name of a FS previously saved with KEEP.

EXAMPLE

A FS, BONUS, is created and maintained for the DS SAMPLE.  It contains records with SALES greater than 500.00.  After working in another DBL, the user can quickly restore the Find Subset BONUS and process it like any Find Subset.

*USE DS BOOKS_DBM2
*EXTRACT SHOW TITLE_CODE,1B,PRICE,1B,TYPE_CODE
CP2264   20.00 computer
CP3896   19.99 computer
FL0839   70.00 for_lang
FL1757   109.50 for_lang
SF4567   77.00 sci_fi
SF6555   .90 sci_fi
6 Record(s) Processed
*FIND IF PRICE > 20
4 Record(s) Found
F*KEEP FS BONUS ENTER IN DBL
F*USE DBL PERIODICALS
*
.
.
.
*USE DBL BOOKS
*USE DS BOOKS_DBM2
*RESTORE FS BONUS
*EXTRACT SHOW TITLE_CODE,1B,PRICE,1B,TYPE_CODE
FL0839   70.00 for_lang
FL1757   109.50 for_lang
SF4567   77.00 sci_fi
SF6555   87.90 sci_fi
4 Record(s) Processed
F*SORT ON -SALES SHOW TITLE_CODE,1B,PRICE,1B,TYPE_CODE
FL1757   109.50 for_lang
SF6555   87.90 sci_fi
SF4567   77.00 sci_fi
FL0839   70.00 for_lang
4 Record(s) Processed
F*RESTORE FS BONUS
*EXTRACT SHOW TITLE_CODE,1B,PRICE,1B,TYPE_CODE
FL0839   70.00 for_lang
FL1757   109.50 for_lang
SF4567   77.00 sci_fi
SF6555   87.90 sci_fi
4 Record(s) Processed

NOTES:  Refer to the discussion of the FIND command for documentation on FS’s.

If the original DS is modified after a FS is saved in a System File (SF), the FS becomes obsolete.  ACCENT R displays an error message when an attempt is made to restore it for use.  The FS object must be created again before it can be used.

The DS must be declared before the RESTORE command is given.

SEE ALSO:  FIND, KEEP, EVALUATE