Learning SAS? Welcome to the exclusive online community for all SAS learners.

Helpful SAS Hints for Beginners

Super User
Posts: 23,700

Helpful SAS Hints for Beginners

In my opinion, there are a few basic references that learning to use will help you out. 


1. Functions

SAS has a lot of functions and reading them through alphabetically isn't helpful. Sometimes you're not even sure what you're looking for. 

There is another organization of the functions, by categories, so all the date/datetime functions are in one section, and all the financial functions are listed separately.  Seeing them all together can also suggest other functions you hadn't considered.




2. Formats

Again, the formats by category is incredibly useful, date and datetime formats are separate from character formats. Did you know that you could use the $QUOTE function to add quotes around a variable. There's also a QUOTE() function (see #1) Smiley Happy






Procs are pretty much the mainstay of SAS and there are a lot of them. Again, when you may not even know what you're looking for it can be hard. Documenation for Procedures is typically organized within modules, ie SAS/ETS and SAS/STAT documentation is stored separately. Learn which modules you have and where the documentation is found for each package. 


Procs that you should learn are:

MEANS - generate summary statistics

FREQ - generate count tables, chi-square, fisher and other table analysis

TRANSPOSE - flips data from wide to long format or vice versa

SORT - How to sort data


4. BY group processing

The documentation does a good job of explaining this, but basically if you need to repeat steps for different groups of data this is a good starting place. 



5. LexJansen.com

This site is a repository of user written SAS papers, as well as SAS employee's. Typically they've been presented at the SAS Global Forum or a different user group meeting. The quality of papers can vary, but the vastness of the topics covered is worth mentioning. 



Trusted Advisor
Posts: 1,403

Re: Helpful SAS Hints for Beginners

To get started I'd encourage beginners to do the free e-learning SAS Programming 1 and Statistics 1 courses at https://support.sas.com/edu/elearning.html?ctry=us&productType=library Here you will learn the fundamentals of the SAS syntax - the data step and some procedures (procs).


There are also a huge range of free tutorials at https://support.sas.com/training/tutorial/index.html


Kind Regards,


Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation