| SAS Companion for the CMS Environment |
You can use the FILE command to copy the contents of many different
windows to external files. Issue the FILE command on the command line of the
window whose contents you want to copy. For example, to copy the contents
of the log window to a sequential data set, issue the following command on
the command line of the log window:
file 'logout saslog b'
If the file already exists, a requestor window asks
you whether you want to replace it or to append data to the existing file.
You can route the contents of many windows, including the Log,
Program Editor, and Output windows, to an external file by using the PRTFILE
command followed by the PRINT command.
Normally, the PRINT command is used to send the contents
of a window to the printer. When you use the PRINT command, the default destination
is controlled by the FORM subsystem. One way to override the default print
destination established by the FORM subsystem is to use the PRTFILE command.
For example, to route the contents of your Output window
to the file 'MYFILE OUTPUT C', you enter the following command from the Output
window command line:
prtfile 'myfile output c'
This directs the output from the PRINT command to the
external file 'MYFILE OUTPUT C'. Then, you enter the following command from
the command line of the Output window:
print
If the file already exists, you are asked if you want
to append or replace the data in the file or cancel the PRINT command. Then,
if you actually want to print the file, you enter the following command from
the command line:
free
Using the PRTFILE and PRINT commands results in files
with carriage returns if you are using the default form for carriage control
in the FORM subsystem. See Using External Files
for more information about writing to print files and nonprint files. Modifying
the defaults in the FORM subsystem is discussed in Modifying Your Default Form
.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.