Currently, I am having two proc sql statement where one get's the count of the data and the other sql query creates a new table based on that count. I am trying to create a macro as both the query as same but not able to figure how can I achieve both results?
I don't really see a macro being necessary to accomplish this task.
set emp end=eof;
if eof=1 then do;
The above should create dataset emp_new containing one column (emp_cnt) and one row containing the count of rows in emp, while also putting the count into variable &emp_cnt. Above is untested but assumed to work.
Message was edited by: mkastin