Welcome to the SAS forums. Unfortunately your question and code are not clear. Or at least what you're looking for isn't clear. Can you please clarify what exactly you need help with. I would also strongly suggest looking at the SAS Macro Appendix which has several sample macros, including one to check and see if a data set exists. That may be a good starting point for your solution. Note: I've modified your subject line to make it more descriptive and attempted to format your code, but it's incomplete and buggy - you have incorrectly formed comments so it's hard to read or understand. And a big suggestion that will help you - include comments. Always. It tells both future you and others what you're attempting to accomplish or expecting.
... View more