On Tue, 12 Oct 2010 16:38:12 -0700, Richard Schuh wrote:
>Is there any good pipe solution for transforming these records to
>"Header sum" where sum is the total of all of the fn fields

I'd use CHOP|SPLIT|JUXTAPOSE to break each field out into its own record,
then SPECS to add them up, something like:

  (end /) ...
    | header: chop n
    | field: juxtapose
    | specs nowrite a: 1-n 1 b: N-* . set #0+=b break a print #0 N write
    | ...
    / header:
    | split
    | field:

(where N = n+1).

¬R

Reply via email to