I don't think there is a straight forward approach for this, you may need to develop your own logic. Even though if you scan your .sas file, what if there is a select * program that selects all of the columns. Those columns names are not listed in the program but you are utilizing them.
... View more