HP OpenVMS Systems

ask the wizard
Content starts here

Returning data from a DCL PIPE?

» close window

The Question is:

 
I want to use the pipe command to search a file for a particular record and
 return the record found as a variable.
 
For example:
 
pipe search file string | -
     "get the search record here"
 
This syntax works (sort-of):
 
pipe search file string | -
     (read sys$pipe line)
 
However, because the second segment of the pipe is in a subshell the variable
 line is not available to the parent process.
 
Thanks
Jim Port
ON Semiconductor Technical Support
 


The Answer is :

 
  Please see the discussion of the PIPE command in the OpenVMS FAQ.
 

answer written or last revised on ( 2-MAR-2001 )

» close window