I’m converting a buggy REXX exec that does reporting to Syncsort. I confess that I haven’t used Syncsort in a very long time. There’s a SORTIN and SORTOUT, the input is fixed length columns, I’m summing the last two columns, and this works just fine:
SORT FIELDS=(1,8,CH,A)
SUM FIELDS=(19,15,ZD,35,15,ZD)
OUTREC FIELDS=(19:1,8,
34:19,11,ZD,EDIT=(III,III,III.TT),
51:35,15,ZD,EDIT=(III,III,III))
Now I want to put a total for the last two columns right after the last line of output, and I’ve tried every combination of parameters I can think of for OUTFIL and TOTAL hoping to hit on the magic answer. (Shouldn’t this be easy?) Here’s the one I really thought looked right, these lines added just after the lines I’ve already shown:
OUTFIL REMOVECC,
TRAILER1=(33:15'=',51:11'=',/,
33:TOT=(19,15,ZD,EDIT=(III,III,III,III.TT)),
51:TOT=(35,15,ZD,EDIT=(III,III,III)))
In the SYSOUT, I see:
OUTFIL REMOVECC,
TRAILER1=(33:15'=',51:11'=',/,
*
33:TOT=(19,15,ZD,EDIT=(III,III,III,III.TT)),
*
51:TOT=(35,15,ZD,EDIT=(III,III,III)))
*
END
.
.
.
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER578I SORTL INSTRUCTION NOT USED; REASON CODE=FE
Dr. Google has failed me, and apparently, I don’t grok the documentation. Anyone want to take a stab at this and explain where I went wrong?
I tried FNAMES with REMOVECC farther down, another OUTREC under OUTFIL, random typing (sometimes it works!) etc., and got the same “NO KEYWORDS” messages in the SYSOUT.
I want (not quite exact columns, but looks a lot like this):
A1234567 123,456.00 100
ABC99999 234,569.10 200
=============== ======
361,025.10 300