Hi SASJedi - tried out yours and it also works spot on as seen below. Thanks once again.
Adrian in Johannesburg
proc sort data=LOCAL.BOX;
by TOWN;
run;
data BOX_COMBINED;
set LOCAL.BOX;
by TOWN;
array BOXES{20};
retain BOX:;
if First.TOWN then do;
call missing (of BOXES{*});
_index=0;
end;
_index+1;
BOXES{_index}=BOX;
if Last.TOWN then output;
drop _index BOX;
run;
... View more