Page 1 of 1

DFSORT - number of occurrences of each column

PostPosted: Sun Jul 15, 2018 1:20 am
by NAMPULA
Hi,
Please, could you help me on this.


Layout:
I have this matrix with a group (1-3) and 4 columns:
Group....: position 1-3
Column(A): position 5-7.
Column(B): position 8-10.
Column(C): position 11-13.
Column(D): position 14-16.


GRP.(A)(B)(C)(D)

Data:
AAA 111        
AAA 111        
AAA     222    
AAA         333 
AAA         331 
AAA             441
AAA             442
AAA             442
BBB 123         
BBB         301 
BBB         301 
BBB             404
CCC     888    
 

output:
I need the number of occurrences of each column,
separated by position 1-3 (group), like this:

AAA 002 001 002 003
BBB 001 000 002 001
CCC 000 001 000 000


Thank you so much.

Re: DFSORT - number of occurrences of each column

PostPosted: Sun Jul 15, 2018 2:03 pm
by NAMPULA
I have moved the new information from here to your original post and added the code tags to that post so that your data aligns. I have deleted the rest of this post. Use the code tags to display data, jcl screen shots and anything else that requires a fixed font and maintain multiple spaces. It is simple to that; simply highlight the text to be coded and click the 'Code' button in the editor. You will need to use the full editor to see the buttons.