Mainframe Sort - Getting count based on field

4.4k Views Asked by At

My requirement is to get the count based on the field.

For example:

AAA 1234  
AAA 111  
...  
AAA 112  
BBB 123  
BBB 123  
...  
BBB 333  
CCC 333

Output should be:

AAA 2000  
BBB 300  
CCC 1 

I am using the Sort card:

SORT FIELDS=(1,3,CH,A)                                  
OUTFIL REMOVECC,NODETAIL,                                
  SECTIONS=(1,3,TRAILER3=(1,3,X,COUNT=(M10,LENGTH=10)))

But I need the count to be left justified. Currently the count is displaying with leading spaces.

How can I make these count results left justified?

0

There are 0 best solutions below