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
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: