For decades I've used an XLOOKUP REXX that does this:

  addpipe (end /) xedit | a: lookup ... / *: | a:

and writes nothing to its output--instead, it builds SET SELECT
subcommands to display the matching lines.

I tried to use this today in an exec issued against a line in FILELIST.
 I wanted to restore the position in the file afterward so EXECUTE could
update the file line.  No matter what I did, I couldn't persuade LOOKUP
to read the file from XEDIT before I issued my LOCATE to restore the
position.

Lesson learned:  Either leave an output connected to pass EOF
downstream, or use CALLPIPE instead of ADDPIPE so your pipeline runs
before your output is severed!

¬R

Reply via email to