Running a pipeline with WAIT

Pipelines v1.6

 

.* Example by TenFiftyTwo(c).

Home

 
.* The following pipeline selects '.ppl' files from the 'Processing multiple files' directory, and for
.* each file found, it launches the pipeline: Locate.ppl with the name of the string to locate; 'path='.
.* For the first record in each file that comprises the string, the pipeline writes an output record.
 
.* The pipeline: Locate.ppl, performs the actual search, this pipeline simply generates a list of files
.* to search.
 
.* This example is intended to illustrate how the Runpipe stage command can be used to launch another
.* pipeline with arguments that substitute stage keywords and argument values.
 
pipe filelist noh
              drv=&installdrive 
              path="&installpath\Examples\Processing multiple files" 
              ext=ppl                                                 .* Input file type.
     | specs w5-* 1                                                   .* Discard filelist info.
 
     .* Surround the filename with quotes, append the 'string' keyword, the number of records 
     .* to search and the string to locate.
 
     | specs /"/ 1 1-* n /"/ n /string/ nw /first/ nw /path=/ nw
     .* Call the pipeline.
     | runpipe wait "&installdrive:\&installpath\Examples\Handle arguments\Locate.ppl"