This question also appeared on Quora recently, and Ralph Winters provided a helpful answer. Excerpt (see full topic for more):
Using only base SAS software you are limited in what you can do, but you can apply some simple algorithms to do this.
e.g you can parse the words using some of the built-in Perl functions, eliminate the stop words (‘the’, ‘ a ‘, etc.), performing stemming (‘complain’=’complaining’), etc. and then write the keywords out into a SAS dataset along with the document #.
Then you can merge with a standard sentiment dictionary for positive and negative connotations and assign +1 (for positive word) or -1 (negative word) to a running total. Then summarize the assignments by each document and you have a sentiment metric.
... View more