View previous topic :: View next topic
Author
Message
madmartinsonxx New User Joined: 10 Dec 2010Posts: 96 Location: Massachusetts
Hi,
I am sure I will be able to get this done with DISPLAY or some other mechanism no doubt but I was curious as to whether I can use multiple input fields in a SECTIONS clause to get a count and total. I have used the following approach previously to create a data set:
Code:
SORT FIELDS=(21,7,CH,A)
OUTFIL REMOVECC,NODETAIL,
SECTIONS=(21,7,
TRAILER3=(21,7,' ',COUNT=(EDIT=(IIII)),
' ',TOTAL=(092,11,ZD,EDIT=(III,III,III,IIT.TT))))
works great for user spreadsheets. Now I have to summarize on 3 of these fields. Maybe the Sections= can look like this:
Code:
SECTIONS=(21,7,30,6,55,2
TRAILER3=(21,7,30,6,55,2,' ',COUNT=(EDIT=(IIII))
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Well, this would be correct syntax:
Code:
OUTFIL SECTIONS=(21,7,30,6,55,2,
TRAILER3=(21,7,30,6,55,2,' ',COUNT=(EDIT=(IIII))))
but you really didn't say what you want as output. For this input:
Code:
----+----1----+----2----+----3----+----4----+----5----+---
AAAAAAA BBBBBB CC
AAAAAAA BBBBBB CC
AAAAAAA BBBBBB CC
AAAAAAA BBBBBB DD
AAAAAAA BBBBBB DD
AAAAAAA BBBBBB EE
AAAAAAA CCCCCC EE
AAAAAAA CCCCCC EE
AAAAAAA CCCCCC EE
AAAAAAA CCCCCC FF
AAAAAAA CCCCCC FF
AAAAAAA CCCCCC FF
BBBBBBB CCCCCC FF
BBBBBBB CCCCCC GG
BBBBBBB CCCCCC GG
SORTOUT would have:
Code:
AAAAAAA BBBBBB CC
AAAAAAA BBBBBB CC
AAAAAAA BBBBBB CC
AAAAAAABBBBBBCC 3
AAAAAAA BBBBBB DD
AAAAAAA BBBBBB DD
AAAAAAABBBBBBDD 2
AAAAAAA BBBBBB EE
AAAAAAABBBBBBEE 1
AAAAAAA CCCCCC EE
AAAAAAA CCCCCC EE
AAAAAAA CCCCCC EE
AAAAAAACCCCCCEE 3
AAAAAAA CCCCCC FF
AAAAAAA CCCCCC FF
AAAAAAA CCCCCC FF
AAAAAAACCCCCCFF 3
BBBBBBB CCCCCC FF
BBBBBBBCCCCCCFF 1
BBBBBBB CCCCCC GG
BBBBBBB CCCCCC GG
BBBBBBBCCCCCCGG 2
Back to top
Please enable JavaScript!