View previous topic :: View next topic
|
Author |
Message |
genesis786
Active User
Joined: 28 Sep 2005 Posts: 210 Location: St Katherine's Dock London
|
|
|
|
Hi, I have a file. Position 76 length 1 is a flag of which I want to know how many are of type X, R, N and so on...
I have coded my sort statement like this:
Code: |
INREC FIELDS=(76,1,2:C'=',100,5)
SORT FIELDS=(1,1,CH,D)
SUM FIELDS=(3,5,ZD)
|
but this isn't working. I have tried understanding how Summarizing works but seems too heavy .. can anyone please guide. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Unless you have a valid ZD value of 00001 in positions 100-104 of every record, that won't work. However, these DFSORT statements would work:
Code: |
OPTION ZDPRINT
INREC FIELDS=(76,1,2:C'=',C'00001')
SORT FIELDS=(1,1,CH,D)
SUM FIELDS=(3,5,ZD)
|
|
|
Back to top |
|
|
genesis786
Active User
Joined: 28 Sep 2005 Posts: 210 Location: St Katherine's Dock London
|
|
|
|
thanks Frank! that worked for me |
|
Back to top |
|
|
|