Chapter Contents

Previous

Next
SAS Companion for the OS/390 Environment

Directing Output to a Remote Destination

You can use the DEST= option of the FILENAME statement or FILENAME function to direct output to a remote destination. The destination can be a work station, a local or remote printer, or other device.

In order to direct 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 in length. You must also know the appropriate SYSOUT class for output that is directed to the remote device. Your data center personnel can provide you with this information.

After determining the remote station ID and the SYSOUT class, you use either the TSO ALLOCATE command or a SAS FILENAME statement or FILENAME function to establish a DDname or fileref for the destination. Then use the DDname or fileref with the PRINTTO procedure to direct your output. Here is an example that directs the procedure output file to a remote printer:

filename output sysout=a dest=xyz16670;
proc printto print=output;
proc print data=oranges;
run;

The FILENAME statement includes the options SYSOUT=A and DEST=xyz16670. The values of these options are site specific. In this case, the output class, A, specifies that the output will be directed to a printer. The remote station ID, xyz16670, links the fileref to a particular printer.

The PROC PRINTTO statement then specifies the fileref OUTPUT in the PRINT= option. This option directs 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 the job entry subsystem (JES); the output is not displayed in the OUTPUT window. JES holds the output until the file identified by the fileref OUTPUT is closed and deassigned. Then the output is printed at the remote destination.

To sent the output to the printer for the previous example, submit:

proc printto; run;
filename output;

To direct 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.