The following code using _null_ to get marco variable &sqlobs without print the result .
It is from Arthur Carpenter .

proc sql;
create table _null_ as
select * from sashelp.class
where sex='F';
quit;

%put the number of female is &sqlobs;