1 PIPE
PIPE is a RIT developed utility that allows a user to direct
the output of one DCL command directly to the standard input
of another DCL command. This offers users the ability to
do UNIX-like filtering of commands

    Format:

       $ PIPE      {Pipe will prompt for commands and files }


       $ PIPE  command1 [<infile] | command2 [>outfile]
2 Command_line_usage
PIPE may have all of its information entered to it on the command 
line.  The parameters "command1", "command2" and the "|" character
are required.

   Example 1:

       $ MY_ID = F$GETJPI("","USERNAME")
       $ PIPE SHOW QUE/BAT/DEV/ALL | SEARCH SYS$INPUT 'MY_ID

   Example 2:

       $ PIPE RUN MY_PROG1 <infile.dat | RUN MY_PROG2 > outfile.dat

   This example runs the program MY_PROG1.EXE with SYS$INPUT coming
   from "infile.dat".  The standard output of MY_PROG1 is directed
   to the input of MY_PROG2.EXE and the output of MY_PROG2.EXE being
   directed to "outfile.dat".

   Example 3:

        $ PIPE NODESHOW WHAT VAXA,VAXB,VAXC,VAXD | SEARCH SYS$INPUT ABC1234
2 Inline_usage
PIPE may be invoked by just entering "PIPE" at which point
it will prompt for required input.

    Example 1:

        $ PIPE
        V1.0 (Interactive mode)
        CMD1> SHOW QUE/BATCH/DEVICE/ALL
        CMD2> SEARCH SYS$INPUT executing,printing
        Input file>
        Output file> CURRENT.JOBS

    This example will search all the BATCH and PRINT queues for
    any currently printing and executing jobs and will store the
    result in the file CURRENT.JOBS

    Example 2:

    The same result could be achieved from the following command 
    procedure:

        TEST_PIPE.COM
        $ PIPE
        SHOW QUE/BATCH/DEVICE/ALL
        SEARCH SYS$INPUT executing,printing

        CURRENT.JOBS
        $! end of command procedure.

     To achieve the same result as the first example the blank line
     must be inserted prior to the filename "CURRENT.JOBS"
2 Restrictions
PIPE has the following restrictions.

 1)  Since users are restricted to two subprocesses, PIPE may not execute
     more than two commands. The sequence:

          PIPE cmd1 | cmd2 | cmd3 
 
     will NOT work.

 2)  For the same reason as above PIPE will not function correctly
     if the user already has any subprocesses active.

 3)  PIPE can only process ascii input and output.  The output of
     a compiler cannot be directed through PIPE.

 4)  PIPE is a command developed here at RIT. While it may prove to
     be a helpful utility, users should recognize that it will not
     be available on VMS systems elsewhere.

 5)  Use of PIPE on commands that require interactive input from
     the user will produce unpredictable results. Directing the
     output of a screen editor through PIPE will not work.

2 Hints and Suggestions
PIPE works by first creating a VMS mailbox device, then SPAWNING two
processes to execute two commands. Since filtering of this type
works only when input and output are directed to and from standard
input and standard output (SYS$INPUT and SYS$OUTPUT on VMS). Many
VMS utilities expect a filename for input output.  These utilities
may often be made to function through PIPE by specifying the name
"SYS$INPUT:" or "SYS$OUTPUT" for the required filename.

Symbol Definitions may make this task easier. For example:

        $ grep == "search sys$input:"
        $ pipe where/users/all | grep my_username

        is the same as:

        $ pipe where/users/all | search sys$input: my_username

Since PIPE is rather expensive in CPU and memory resources, Users are
advised to use pipe with consideration, especially when the system is
loaded.
