Pipes for UNIX, Linux, and Windows Users

UNIX, Linux, and Windows users can utilize pipes to redirect input to different outputs (such as to the screen, to an output file, or to another program) without changing the control file.

Note: | is the pipe symbol.
  • If the <FILE> tag used in the <INPUT> group is <FILE>| the data will be read from standard input.
  • If the <FILE> tag used in the <OUTPUT> group is <FILE> | the data will be written to standard output.
An example of a control file that uses pipes is shown below.
<!   Rule File: pipe.ctl                                             >
<!   Author:    Precisely                                         >
<!   Purpose:   How to use pipes for input and output.               >
<INPUT>
   <NAME> INPUT_FILE
   <FILE> |
   <TYPE> P
   <DOCUMENT> 1
   <FIELD> %%NAME R
      <LOC> 2 1 3
      <REPLACE>* YES
   </FIELD>
</INPUT>
<RULE>
   <CONTENT>
      IF %%NAME='JIM' THEN
      %%NAME='JAMES'
      ENDIF
   </CONTENT>
</RULE>
<OUTPUT>
   <NAME> OUTPUT_FILE
   <FILE> |
</OUTPUT>