Hi,
I have a variable from a data set which I receive everyday from different programmers. Some would id number. Some would have it as character and some numeric. My program should check the format of the output and name it PID.
For this I tried this code but the renaming happens anyway.
data data;
set &data;
if (vformatn(&idvar) eq '$') then do;
pid=input(&idvar, 8.);
end;
else do;
rename &idvar=pid;
end;
run;
So the result is the character to numeric conversion never stays.
Please suggest something.
Thank you,
Sandhya.