data r;
set k;
by city;
if first.city then seq+1;
run;
If not then do
data r;
if _n_=1 then do;
dcl hash h();
h.defineKey ("city");
h.defineData ("seq");
h.defineDone ();
end;
set K;
if h.find() ne 0 then do;
seq+1;h.add();
end;
run;
Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.