*Part1
%macro print_want(gr=,subgr=,subASN=);
PROC SQL;
CREATE TABLE SAMPLE1 as
SELECT t1.*
FROM WORK.SAMPLE t1
WHERE t1.group = &gr AND t1.subgroup = &subgr AND t1.subASN = &subASN;
QUIT;
proc print data=sample1;
run;
%mend;
%print_want(gr=1,subgr=1,subASN=2);
*Part2
data sample_new;
set sample;
where subASN between 1 and 4
and subgroup between 1 and 6
and group between 1 and 18;
run;
proc sort data=sample_new;
by group subgroup subASN;
proc print data=sample_new(obs=200);
by group subgroup subASN;
var PWC ASN group subgroup subASN;
run;
... View more