Hello All, I want to do a simple sum() function over some variables in my tables. And since I have so many tables, I want to write one macro code for all of them. The problem is, not all the tables have all the variables! And if you run sum(a1, a2, a3) while for example, "a1" doesn't exist in the table, you'll get an error! I wonder if there is any way to tell SAS to sum(a1, a2, a3) for those that exist in the table. For example, if "a1" doesn't exist, then sum(a1, a2, a3) should give me sum(a2, a3). And if none of them exist then missing value. Any suggestion is much appreciated. Cheers,
... View more