Chapter Contents

Previous

Next
PRINTTO

PRINTTO



Defines destinations for SAS procedure output and for the SAS log

Language element: procedure
OpenVMS specifics: valid values for file-specification; UNIT= option


Syntax
Details
Examples
Example 1: Sending SAS Log Entries to an External File
Example 2: Sending Procedure Output to an External File
Example 3: Sending Procedure Output to a System Printer
Example 4: Redirecting SAS Log and Procedure Output to the Default
Example 5: Sending Procedure Output to a File
See Also

Syntax

PROC PRINTTO <option(s)>

Note:   This is a simplified version of the PRINTTO procedure syntax. For the complete syntax and its explanation, see the PRINTTO procedure in SAS Procedures Guide.  [cautionend]

option(s)

FILE=file-specification
specifies a fileref, a fully qualified OpenVMS pathname (in quotation marks), or an OpenVMS logical name. This is an alias for the PRINT= option.

LOG=file-specification
specifies a fileref, a fully qualified OpenVMS pathname (in quotation marks), or an OpenVMS logical name.

NAME=file-specification
specifies a fileref, a fully qualified OpenVMS pathname (in quotation marks), or an OpenVMS logical name. This is an alias for the PRINT= option.

PRINT=file-specification
specifies a fileref, a fully qualified OpenVMS pathname (in quotation marks), or an OpenVMS logical name.

UNIT=nn
sends output to the file FTnnF001.LIS, where nn represents the UNIT= value, which can range from 1 to 99.


Details

The PRINTTO procedure defines destinations for SAS procedure output and for the SAS log.

To send output directly to a printer, use a FILENAME statement with the PRINTER device-type keyword. This sends the output to the default SYS$PRINT queue. If you want to override the default queue, use the QUEUE= option in the FILENAME statement to specify a different queue.

Note:   You cannot send the output directly to a member of a text library or to a remote node or tape.  [cautionend]


Examples

Example 1: Sending SAS Log Entries to an External File

The following statements send any SAS log entries that are generated after the RUN statement to the external file that is associated with the fileref MYFILE:

filename myfile '[mydir]mylog.log';

proc printto log=myfile;
run;

Example 2: Sending Procedure Output to an External File

The following statements send the procedure output from the CONTENTS procedure (and any other subsequent procedure output from the SAS session) to the external file that is associated with the OpenVMS logical name OUTPUT:

x 'define output [mydir]proc1.lis';
proc printto print=output;
run;

proc contents data=oranges;
run;

Example 3: Sending Procedure Output to a System Printer

The following statements send the procedure output from the CONTENTS procedure directly to the system printer:

filename myfile printer '[mydir]proc2.lis';

proc printto print=myfile;
run;

proc contents data=oranges;
run;

Example 4: Redirecting SAS Log and Procedure Output to the Default

The following statements (a PROC PRINTTO statement with no options) redirect the SAS log and procedure output to the original default destinations:

proc printto;
run;

Example 5: Sending Procedure Output to a File

The following statements send any procedure output to a file named MYPRINT.DAT:

proc printto print=myprint;
run;

See Also


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.