Chapter Contents |
Previous |
Next |
FILE |
Language element: | command |
OpenVMS specifics: | valid values for file-specification |
Syntax | |
Details | |
Examples | |
Example 1: Copying Text from a Window to a File | |
Example 2: Appending Text to an Existing External File | |
See Also |
Syntax |
FILE <filename> <option-list> |
Details |
The FILE command writes the entire contents of the current window to an external file without removing text from the window.
You can also use a physical filename (enclosed in quotation marks) in place of the fileref.
If you have not issued any FILE or INCLUDE commands, then an error message informs you that no default file exists. For a list of default file types used for the FILE command, see Default File Types.
Examples |
Suppose you have previously specified the following FILENAME statement:
filename sasfile '[mydir]program1.sas';
Issuing the following FILE command on the PROGRAM EDITOR command line copies the text from the PROGRAM EDITOR window into the file PROGRAM1.SAS:
file sasfile
To append text to an existing external file, use the APPEND option in the FILE command. For example, you can issue the following command from the Program Editor window to append the contents to the file associated with the fileref MYFILE:
file myfile append
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.