Routing the SAS Log and SAS Procedure Output |
The PRTFILE command enables you to change the control information for a file that you are routing to a printer. For example, if you want to send a file to a printer queue other than the default, submit the following FILENAME statement:
filename woutput printer queue=myqueue;
Then you can issue the following series of commands from the command line of a window to send the contents of the window to the MYQUEUE printer queue:
prtfile woutput print free
After you issue the PRTFILE command, a note in the SAS log indicates that the output was sent to a file named SAS nnnn.DAT. This is a temporary file that is deleted when you issue the PRINT command.
As another example, the following FILENAME statement associates the fileref MYFILE with the external file [MYDIR]SPECIAL.SAS and specifies that the carriage-control format is FORTRAN:
filename myfile '[mydir]special.sas' cc=fortran;
Then the following series of commands from the command line of a window sends the contents of the window to the external file SPECIAL.SAS:
prtfile woutput print myfile free
Note: Do not use the PRTFILE command with the FSFORM command. For information about the FSFORM command, see Host-Specific Frames of the Form Window.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.