/* test data */
data one;
do i = 1 to 1e6/2;
a=1; b=2; c='a+b'; d=0; output;
a=1; b=2; c='a-b'; d=0; output;
end;
run;
data two;
set one;
length m $200;
retain popen '(' pclose ')';
m = c;
m = transtrn(m, 'a', catt(popen, put(a,best.-l), pclose));
m = transtrn(m, 'b', catt(popen, put(b,best.-l), pclose));
m = catt('%sysevalf', popen, m, pclose);
d = input(resolve(m), best.);
keep a b c d;
run;
/* on log
NOTE: There were 1000000 observations read from the data set WORK.ONE.
NOTE: The data set WORK.TWO has 1000000 observations and 4 variables.
NOTE: DATA statement used (Total process time):
real time 25.53 seconds
cpu time 25.52 seconds
*/
proc print data=two(obs=3);
run;
/* on lst
Obs a b c d
1 1 2 a+b 3
2 1 2 a-b -1
3 1 2 a+b 3
*/
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: