Next: , Previous: MATCH FILES, Up: System and Portable Files



7.6 SAVE

     SAVE
             /OUTFILE='filename'
             /{COMPRESSED,UNCOMPRESSED}
             /DROP=var_list
             /KEEP=var_list
             /VERSION=version
             /RENAME=(src_names=target_names)...

The SAVE procedure causes the dictionary and data in the active file to be written to a system file.

OUTFILE is the only required subcommand. Specify the system file to be written as a string file name or a file handle (see FILE HANDLE).

The COMPRESS and UNCOMPRESS subcommand determine whether the saved system file is compressed. By default, system files are compressed. This default can be changed with the SET command (see SET).

By default, all the variables in the active file dictionary are written to the system file. The DROP subcommand can be used to specify a list of variables not to be written. In contrast, KEEP specifies variables to be written, with all variables not specified not written.

Normally variables are saved to a system file under the same names they have in the active file. Use the RENAME subcommand to change these names. Specify, within parentheses, a list of variable names followed by an equals sign (=) and the names that they should be renamed to. Multiple parenthesized groups of variable names can be included on a single RENAME subcommand. Variables' names may be swapped using a RENAME subcommand of the form /RENAME=(A B=B A).

Alternate syntax for the RENAME subcommand allows the parentheses to be eliminated. When this is done, only a single variable may be renamed at once. For instance, /RENAME=A=B. This alternate syntax is deprecated.

DROP, KEEP, and RENAME are performed in left-to-right order. They each may be present any number of times. SAVE never modifies the active file. DROP, KEEP, and RENAME only affect the system file written to disk.

The VERSION subcommand specifies the version of the file format. Valid versions are '3' and '3x'. Version 3x system files are identical to version 3 files, except that variable names greater than 8 bytes will be truncated. The default version is 3. The VERSION subcommand is optional. There is no need ever to use it.

SAVE causes the data to be read. It is a procedure.