Chapter Contents

Previous

Next
SAS Companion for the CMS Environment

Routing Output to a Remote Destination

Use the PRINTTO= option of the FILENAME statement to route output to a remote destination. The destination can be a workstation, a local or remote printer, or other device.

In order to route your output to a remote destination, you must know the remote station ID of the device that will receive your output. The station ID is an identifying label that is established by your data center; it is one to eight characters long. You must also know the appropriate output class for output that is directed to the remote device. Your data center personnel can provide you with this information. See also information on the CP TAG or SPOOL command in the VM CP General User Comand Reference.

After determining the remote station ID and the output class, you use the SAS FILENAME statement to establish the fileref for the destination. Then use the fileref with the PRINTTO procedure to route your output. Here is an example that routes the procedure output file to a remote printer:

filename output printer;
proc printto print=output;
proc print data=oranges;
run;

In the preceding FILENAME statement, OUTPUT is the fileref for the printer; PRINTER is the device type.

The PROC PRINTTO statement then specifies the fileref OUTPUT in the PRINT= option. This option routes the procedure output file to the destination that was associated with the fileref OUTPUT in the FILENAME statement. When the PRINT procedure is executed, SAS sends the procedure output to your virtual printer. CMS holds the output in the virtual printer until the file that is identified by the fileref OUTPUT is freed. Then the output is printed at the remote destination.

To route the SAS log to a remote destination, use the same procedure, but use the LOG= option instead of the PRINT= option with the PROC PRINTTO statement.


Chapter Contents

Previous

Next

Top of Page

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