|SAS Companion for UNIX Environments| Under UNIX, you can use
the FILENAME statement to assign not only to external files and
I/O devices, but also to a pipe. Pipes enable your SAS
application to receive input from any UNIX command that writes
to standard output and to route output to any UNIX command that
reads from standard input. In UNIX commands, the pipe is
represented by a vertical bar (|). For example, to find the
number of files in your directory, you could redirect the output
of the through a pipe to the (word count) command by entering ls
| wc -w The syntax of the FILENAME statement is |FILENAME
fileref PIPE 'UNIX-command' <options>;| Whether you are using
the command as input or output depends on whether you use the
fileref in a reading or writing operation. For example, if the
fileref is used in an INFILE statement, then the SAS System
assumes that the input comes from a UNIX command; if the fileref
is used in a FILE statement, then the SAS System assumes that
the output goes to a UNIX command. |U