Hi all SAS Experts,
Because I am learning SAS so normally, I want to know many types of solutions for one problem, that is why in my code, I always try to find some alternative ways to deal with a step.
But it also comes with a cost that sometimes I do not know how to store my alternative solution quickly.
For example, these two methods below generating the same result:
*method 1;
proc means data=agg_amihud_vw noprint nway;
class LOC;
var agg_amh_vw;
output out=final_amihud mean=final_amh;
run;
*method 2;
proc sql;
create table new as
select LOC
,mean(agg_amh_vw) as final_amh
from agg_amihud_vw
group by LOC
;
run;
And when I want to put method 2 to comment, I need to delete all the semicolon, which causes a lot of trouble when I want to call it again because sometimes I just forget to put the ";" somewhere, especially in case the alternative code is long
*method 2
proc sql
create table new as
select LOC
,mean(agg_amh_vw) as final_amh
from agg_amihud_vw
group by LOC
run;
I know there are only three types of comment in SAS (*...; /* ....*/, and Comment....;). However, I want to ask your experience in storing the alternative method for one solution that I can learn from.
Many thanks and warmest regards.
Have a good week!
... View more