On 2019-03-05 10:38 PM, Bishop, Peter wrote:
> The question is:  how can a get a message similar to "Unit not found"
> to display, instead of nothing as happens now?
When you're searching for something, the alternate outputs of LOOKUP can
give you the unmatched records to process:

PIPE (end /) cp q dasd free
  | split
  | strip ,
  | find: lookup w2 w1 detail
  | console
  / var unit
  | find:
  / find:
  | insert ,Unit not found: ,
  | console

In general, when you want to replace an empty file with a message, you
can use COUNT and look for a zero:

PIPE (end /) ... | found: count lines | zero: fanin | ...
  / found: | pick w1 = ,0, | specs ,nothing here, 1 | zero:

¬R

Reply via email to