I am wondering how to automatically delete an entire dataset if there are no observations. The macro I created scrolls through an entire library and manipulates all the datasets within the library. However there are a few that have no observations and the macro still creates them as an ouput dataset. I don't want to use proc datasets and the specific dataset name to get rid of them because they may have data in them in the future. These datasets are causing errors later on in my code.
The referenced paper makes mention of observation level deletion, not file deletion. Explore using DICTONARY.MEMBERS (SAS-maintained view) with PROC SQL to detect an empty SAS member and generate PROC DELETE code.
Have a look at the SAS support http://support.sas.com/ website for SAS-hosted documentation and technical/conference papers, using the SEARCH facility or Google advanced search with the parameter site:sas.com (limits the search).