Hi,
I have below requirement. My file is:
EMP-ID;JULIANDATE;XXXXXX;
Now I want to sum up the records where emp-id and julian date matches and to keep only the first record in output with the count.
Example:
EB111111111;2011068;xxxxxx,yyyyyy,zzzzz,dddddd ------>FIRST RECORD
EB111111111;2011068;xxxxxx,yyyyyy,zzzzz,dddddd ------>SECOND RECORD
EB111111111;2011069;xxxxxx,yyyyyy,zzzzz,dddddd ------->THIRD RECORD
EB122222222;2011068;xxxxxx,yyyyyy,zzzzz,dddddd ------->FOURTH RECORD
THE OUTPUT FILE SHOULD BE:
EB111111111;2011068;xxxxxx,yyyyyy,zzzzz,dddddd,02 ------>FIRST RECORD
EB111111111;2011069;xxxxxx,yyyyyy,zzzzz,dddddd,01 ------->THIRD RECORD
EB122222222;2011068;xxxxxx,yyyyyy,zzzzz,dddddd,01 ------->FOURTH RECORD
I TRIED THE BELOW SORT:
SORT FIELDS=(1,11,CH,A,13,7,CH,A),EQUALS
SUM FIELDS=(70,2,PD)
BUT I AM GETTING SOC7 I ALSO TRIED SUM FIELDS=(70,2,BI) BUT GETTING RC=04 AND IMPROPER RESULTS WITH DATA OVERFLOW ISSUE.
CAN ANYONE PLEASE SUGGEST HOW TO RESOLVE AND GET THE OUTPUT AS NEEDED.