SAS Tips and Techniques

This page gives some tips, tricks and style hints for programming in SAS, based on my 25+ years of experience as a SAS programmer in the pharmaceutical and biotech industries. I hope you find them useful.

Left-aligning PROC REPORT output

Quoting macro variables - keep it simple

Precautions when using RETAIN

Rounding numbers dynamically

Recording the source of observations

Bad style

Using order=data in PROC REPORT

Using PROC SQL

Getting Started with the SAS Macro Language