## Sum an alphanumeric fields

IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

### Re: Sum an alphanumeric fields

Well, apart from the ".X." left over from the earlier thing you showed, and some subtraction from 10,000 to get the xxxx value, you should be about there.
BillyBoyo
Global moderator

Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

### Re: Sum an alphanumeric fields

Sorry, but i don't understand you answer.
danylele74

Posts: 12
Joined: Thu Jul 03, 2014 2:00 am
Has thanked: 0 time
Been thanked: 0 time

### Re: Sum an alphanumeric fields

Delete the ",X". Subtract that final value from 10,000, which will give you the remaining length of the record after the field whose sum you want. Replace the xxxx with the result of your calculation. Try it out.
BillyBoyo
Global moderator

Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

### Re: Sum an alphanumeric fields

It works !!! Thank you very much.

Here the solution:

SORT FIELDS=(13,9,CH,A),FORMAT=BI
OUTFIL REMOVECC,NODETAIL,
SECTIONS=(13,9,
TRAILER3=(1:1,3673,
TOT=(3674,19,SFF,EDIT=(STTTTTTTTTTTTTTT.TT),SIGNS=(+,-)),
3693,6307))
danylele74

Posts: 12
Joined: Thu Jul 03, 2014 2:00 am
Has thanked: 0 time
Been thanked: 0 time

### Re: Sum an alphanumeric fields

Why are you sorting with character as well as Binary ?

SORT FIELDS=(13,9,CH,A),FORMAT=BI

Regards
Magesh
Magesh23586

Posts: 36
Joined: Sat Jul 05, 2014 5:36 pm
Has thanked: 1 time
Been thanked: 3 times

Previous