View previous topic :: View next topic
|
Author |
Message |
anatol
Active User
Joined: 20 May 2010 Posts: 121 Location: canada
|
|
|
|
I have input ( positions is as in sample) :
Code: |
AA 10
AA 10
BB 30
AA 10
AA 20
BB 10
CC 10 |
the output should be sum and count :
Code: |
AA 50 04
BB 40 02
cc 10 01 |
Could you please help |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
SORT on the key.
Use OUTFIL with NODETAIL,REMOVECC with SECTIONS for the key and TRAILER2 with TOT and COUNT. |
|
Back to top |
|
|
anatol
Active User
Joined: 20 May 2010 Posts: 121 Location: canada
|
|
|
|
ok, I'll try ... not success so far ( positions are different from sample):
Code: |
SORT FIELDS=(1,6,CH,A)
OUTFIL REMOVECC,NODETAIL,
SECTIONS=(1,6,
TRAILER2=(1,8,
$
ICE223A 0 REPORT FIELD ERROR
TOT=(562,8,PD,M3),COUNT))
$
|
|
|
Back to top |
|
|
anatol
Active User
Joined: 20 May 2010 Posts: 121 Location: canada
|
|
|
|
before Frank was retired, he just post tested solution... I've missed Frank |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Sorry, the 2 and 3 are close together on my keyboard. Try with TRAILER3 for SECTIONS. |
|
Back to top |
|
|
anatol
Active User
Joined: 20 May 2010 Posts: 121 Location: canada
|
|
|
|
thank you ... I will try ... I just need counter - thanks for the secsion idea |
|
Back to top |
|
|
anatol
Active User
Joined: 20 May 2010 Posts: 121 Location: canada
|
|
|
|
worked - thank you |
|
Back to top |
|
|
|