no output if zero obs

Regular Learner
Posts: 1

no output if zero obs

[ Edited ]


I am new to sas.Below macro is creating a permanent dataset in my code.Is there any way to not output this dataset if have 0 obs.

Note:   Dont have access to macro code so cant change macro.





Respected Advisor
Posts: 2,836

Re: no output if zero obs

Since we don't have access to the macro code, the answer to your question is:



Paige Miller
Super User
Posts: 13,358

Re: no output if zero obs

If you don't want a 0 obs data set then write a program to delete it, perhaps a macro if you can build the output data set library and name from the information you provide to that existing macro. Then run it after the offending macro. Make sure that you actually test for 0 obs in the macro so it performs the task conditionally:



Ask a Question
Discussion stats
  • 2 replies
  • 1 like
  • 3 in conversation