Have you considered something like: pipe < input.file | join x05 | specs a: f1 . b: substr 8-14 of f2 . 1-* 1 print a+b 8-14 r | > output.file
We combine the records pairwise as two fields, making them easier to process, and then we do what we want on the compound record. I hope this helps. On Thu, Jan 28, 2016 at 5:22 PM, Bob Cronin <bob.cro...@gmail.com> wrote: > Hello specs fans, > > I have two records, like so: > > nnnnnnn > CCCCCCCmmmmmmmCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC > > where nnnnnnn is a right justified integer and mmmmmmm is either that, or > blanks (which should be considered the equivalent of zero). C is an > arbitrary character. > > I want to emit the just the second record, with the mmmmmmm replaced with > the sum of nnnnnnn and mmmmmmm (or left alone if nnnnnnn is zero). > > I am trying to do this with specs, but am getting nowhere. > -- > bc > -- OREXXMan