Hi , I have a table as below
data have;
length ID $10. score 8. formula $200.;
infile datalines dsd missover ;
input ID $ score formula $;
datalines;
KRI1,,KRI2/KRI3
KRI2,1,
KRI3,10,
KRI4,,(KRI5-KRI6)*100
KRI5,13,
KRI6,16,
KRI7,,(KRI8+KRI9)/(KRI10-KRI11)
KRI8,13,
KRI9,16,
KRI10,1,
KRI11,10,
;
run;
I want to replace the formula ID's with actual values. i can filter out the formula data by using where the formula is not empty but my actual table has +250k rows and i can't do a standard loop and replace method. I want my want table as
data want;
length ID $10. formula $200. score 8. ;
infile datalines dsd missover ;
input ID $ formula $ score;
datalines;
KRI1,1/10,0.1
KRI4,(13-16)*100,-300
KRI7,(13+16)/(1-10),-3.22
;
run;
for a smaller data I am using loop and tranwrd function and then use eval method to calculate the final value. How can i do the same for a large dataset?
... View more