So assuming that the ptnm and stdt gets split on commas, you could do something like this:
/* UNTESTED CODE */
data want;
set have;
record=1;
do while (not missing(scan(ptnm,record,',')));
ptnm_new=scan(ptnm,record,',');
stdt_new=scan(stdt,record,',');
record=record+1;
output;
end;
drop record ptnm stdt;
run;
So assuming that the ptnm and stdt gets split on commas, you could do something like this:
/* UNTESTED CODE */
data want;
set have;
record=1;
do while (not missing(scan(ptnm,record,',')));
ptnm_new=scan(ptnm,record,',');
stdt_new=scan(stdt,record,',');
record=record+1;
output;
end;
drop record ptnm stdt;
run;