I am new to SAS and i am trying to split columns and give the splitted results new names. What i hope to achieve: for example I have a column AV. My code needs to split it and calls the two new columns FROM_AV and TO_AV. I have tried multiple options, but it is still going wrong by creating the new names. i. It would be great if someone could help me out.
set work.transposed;
array aresplit AV TD ER PT;
do i=1 to 4;
FROM&aresplit[i]= scan(aresplit[i],1,',');
TO&aresplit[i]= scan(aresplit[i],2,',');
end;
run;```