Difference between revisions of "SAVE"

From Recital Documentation Wiki
Jump to: navigation, search
(Class)
Line 1: Line 1:
==Class==
 
Memory Variables
 
  
  

Revision as of 15:09, 23 October 2009


Purpose

Save the current memory variables to a file


Syntax

SAVE TO <.mem filename> | (<exp>)

[ALL LIKE <skeleton>]

[ALL EXCEPT <skeleton>]

[FOXPRO]


See Also

DB_FOXMEM, MODIFY COMMAND, PRIVATE, PUBLIC, RESTORE, STORE


Description

The SAVE command saves all of the memory variables and arrays to an ASCII text file <.mem filename>. The filename can be substituted with an <expC>, enclosed in round brackets, which returns a valid filename. If no file extension is specified, then the Recital/4GL uses '.mem'. By default, all memory variables are saved unless the ALL LIKE or ALL EXCEPT clauses are specified. The <skeleton> takes the normal rules of '?' matching any single character and '*' matching zero or more characters.

The saved file is a normal ASCII text file, which can be edited using MODIFY COMMAND. The contents of this file consist of a series of STORE commands that give details of the value of the memory variable when it was saved. The memory variables can be restored from the file using the RESTORE command. Whenever an error is detected in a program file, the Recital/4GL automatically saves the state of all the current memory variables in the file 'error.mem'. This file also contains the same information that is displayed with the DISPLAY STATUS command.

If the FOXPRO keyword is specified, the memory files are created as FoxPro style binary files. This is also the case if the DB_FOXMEM environment variable / symbol is set (on, true, yes).


Example

save to monday all like mon_*
save to others all except mon_*


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer