I wonder if there is a way of detecting whether a data set is empty, i.e. it has no observations. Or in another saying, how to get the number of observations in a specific d
It's easy with PROC SQL. Do a count and put the results in a macro variable.
proc sql noprint; select count(*) into :observations from library.dataset; quit;