[This site is not connected with the SAS Institute]
[last updated - 05 September 2003]
You can find a lot of good SAS tips on the Internet. Don't think this site of mine is a definitive source. It certainly is not. I often look at the sas Technical Support site to see examples of usage and to attempt to resolve problems. Outside the official sas site, there is the www.sconsig.com web site that has hundreds of useful tips and code that you can download. You can also search that site for the information you need just like you can the sas Technical Support site. There is plenty of useful examples in the official sas documentation. And if you don't have a copy of that then there are a few Universities who have web sites with the sas documentation who have, perhaps unwittingly, made it available to the public to browse. So there are plenty of tips out there. And if you are really stuck then there is the comp.soft-sys.sas newsgroup. So long as you have posting access, you can post your questions or problems there and somebody should respond quite quickly. There is also a mailing list called SAS-L that sits behind that newsgroup. For information on how to subscribe to the list, then check out the www.sconsig.com web site.
I must have coded more than a thousand sas macros since I started in late 1986. I've encountered all sorts of problems with them over the course of these years so I have a lot of tips to give about writing macros. This will be a very full page and my "pain" will be your "gain" if you read them and take note. As I think of other tips I will add new sections and add the items onto the pages but for now the links are as follows.
CODE DOCUMENTATION (the most important tip
of all)
Writing SAS macros
Floating point number accuracy
Deadly errors you can make
Things I hate about SAS software
data _null_ unleashed
Stacked column reports with data _null_
data _null_ tips and techniques
Browsing SAS Graphs
in a PDS (IBM mainframe only - offsite pdf file)
SQL vs. data steps
LOCF (Last Observation Carried Forward) processing
Time-to-event processing
Fun with formats
Using Boolean expressions in calculations
Deleting datasets more than a month old
Testing for the existence of a global macro variable
Reading a data set using pure macro code
Quoting quoted text with SAS code and macro language
Combining data sets with identically named character
variable of different lengths
Go back to the home page.
E-mail the macro and web site author.