data sales; input Region $ State $ Sales :dollar8. Year Qtr; datalines; West CA 13636 1999 1 West OR 18988 1999 1 West CA 14523 1999 2 West OR 18988 1999 2 East MA 18038 1999 1 East NC 13611 1999 1 East MA 11084 1999 3 East NC 19660 1999 2 West CA 12536 1998 1 West OR 17888 1997 1 West CA 15623 1998 3 West OR 17963 1997 2 East NC 17638 1998 1 East MA 12811 1998 1 East NC 12184 1998 4 East MA 12760 1998 4 West CA 13636 1999 1 West OR 18988 2000 3 West CA 14523 2000 4 West OR 18988 1999 2 East MA 18038 1998 1 East NC 13611 1997 1 East MA 11084 1999 2 East NC 19660 2000 2 West CA 12536 1997 4 West OR 17888 2000 4 West CA 15623 1997 3 West OR 17963 2000 4 East NC 17638 2000 3 East MA 12811 1997 3 East NC 12184 1997 4 East MA 12760 2000 3 ; run; %macro sumry(dsn,var1,var2); proc sort data=&dsn; by year; run; proc means data=&dsn noobs sum mean; by year; class region qtr state; var &dsn; where year>&var1 and year<&var2; run; %mend; %sumry(sales,1998,2000); when i run this programe it runs fine. but when i use macro then its shows no obs selected. not able to find problem. plz help thanks
... View more