Please kindly me help me with SAS syntax correct for each line.
Like line2 with the right option should be "out" but not "outdata"
1.
proc sort data=ccm_base_cust_inf_m(keep becif_custid cert_id_18)
2.
outdata=ccm_base_cust_inf_m;
where cert_id_18 <>"";
by cert_id_18;
3.
proc sort data=prom_cust_inf(rename=(id=cert_id_18));
by id;
4.
data prom_cust_inf_1;
5.
merge prom_cust_inf(in=a)
ccm_base_acct_inf_m(in=b);
6.
by id;
if a;
length base_city=$20.;
base_city=input(base_city,$city.);
7.
%let city=%str(NY","SH","TK");
8.
proc summary data=prom_cust_inf_1 nway;
9.
by base_city;
10.
var response_flag;
out=stat_city_sum(drop=_type_) sum;
run;
change :
outdata=ccm_base_cust_inf_m;
to:
out=ccm_base_cust_inf_m;
1.
proc sort data=ccm_base_cust_inf_m(keep becif_custid cert_id_18)
2.
out=ccm_base_cust_inf_m;
where cert_id_18 ne "";
by cert_id_18;
3.
proc sort data=prom_cust_inf out=(rename=(id=cert_id_18));
by id;
4.
data prom_cust_inf_1;
5.
merge prom_cust_inf(in=a)
ccm_base_acct_inf_m(in=b);
6.
by id;
if a;
length base_city $20.;
base_city=input(base_city,$city.);
7.
%let city=%str(NY,SH,TK);
8.
proc summary data=prom_cust_inf_1 nway;
9.
by base_city;
10.
var response_flag;
out=stat_city_sum(drop=_type_) sum;
run
That is it, does it work now?
Happy data mining
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.