由买买提看人间百态

topics

全部话题 - 话题: mem2
(共0页)
S******y
发帖数: 1123
1
来自主题: Statistics版 - nodupkey 删除的observations怎么查看?
%macro cmpar_d2(lib1=,mem1=,lib2=,mem2=);
/* Get the obs in lib1.mem1 but not in lib2.mem2 */
/* and store OBS and VARS in ONEXTWO Dataset */
proc sql;
create table onextwo as
select *
from &lib1..&mem1
except corr all
select *
from &lib2..&mem2
;
quit;
/* Get the obs in lib2.mem2 but not in lib1.mem1 */
/* and store OBS and VARS in TWOXONE Dataset */
proc sql;
create table twoxone as
select *
from &lib2..&mem2
except corr all
S******y
发帖数: 1123
2
/* Macro to compare 2 SAS data sets using set operator: except */
%macro cmpar_d2(lib1=,mem1=,lib2=,mem2=);
/* Get the obs in lib1.mem1 but not in lib2.mem2 */
/* and store OBS and VARS in ONEXTWO Dataset */
proc sql;
create table onextwo as
select *
from &lib1..&mem1
except corr all
select *
from &lib2..&mem2
;
quit;
/* Get the obs in lib2.mem2 but not in lib1.mem1 */
/* and store OBS and VARS in TWOXONE Dataset */
proc sql;
create table t
(共0页)