Yes I need to add the $ sign for all amounts as well as inset commas and ampersands for names.
This is basically the previous part of teh code which is formatting of the data.
Thsi formatted data will be input to my other transwrd code.
Does CUST=100 with EVT=23 have any relationship at all to CUST=123 with EVT=1??? I ask because with BY group processing, all the CUST=100 would sort before CUST=123. I sense that these 4 observations may be related to one "case"...what would happen if you had 2 "cases" How do you know that the EVT=1 belongs to the observations "above" it???
This works for PARTY given you data but you need to show more records, and complete specs.
input (Cust Typ ID Field)($) field_value &$16.;
100 EVT 23 PARTY JOHN SMITH
100 EVT 23 PARTY EMMA SMITH
100 EVT 23 PARTY BBT COMPANY
123 EVT 1 AggValue 61309
by cust typ id field;
if field eq 'PARTY' then do;
length string $64;
string = catx(cat(substr(', &',1+last.field,1+last.field),' '),string,field_value);
else string = ' ';
There have been a lot of previous postings about the John Smith and the EVT data -- rather than posting pieces of the same problem program over and over, perhaps you could share one entire program log and a sample of your data for folks to work with.