On 1/28/2016 5:40 PM, Hobart Spitz wrote:
> pipe < input.file | join x05 | specs a: f1 . b: substr 8-14 of f2 . 1-* 1
> print a+b 8-14 r | > output.file

To save a value from the first record, you can stick it in a counter:

  ... | specs a: 1-* . set #1:=a
          read b: 8-14 . 1-* 1 print #1+b 8-14 r | ...

It seems like using the second reading station *should* be a neat way to
do this without the extra counter:

  ... | specs select second a: 1-* .
          select first b: 8-14 . 1-* 1 print a+b 8-14 r read | ...

But the run-in cycle makes it much messier than that.  Because you start
off processing the first record by itself, you wind up needing some
kludge to avoid writing extra output and skipping an extra record at the
start.

¬R

Reply via email to