SAS tips and tricks

These pages listed here are based on SAS seminars I gave in 1999-2000, aimed at epidemiology doctoral students in my department. I no longer use SAS, and these files are not maintained or updated. The code is based on SAS version 6.

My SAS code for estimating and modelling relative survival can be found here

Index of SAS tips and tricks

Slides (PDF format) from other presenters in the same series

Extended index (with short summary of each page)

SAS Tips: Missing values

Overview of the types of missing values (numeric, character, special) and their sort order

SAS Tips: permanent format catalogues

SAS permanent format catalogues

SAS Tips: Printing all variables for a single observation

Printing all variables for a single observation

SAS Tips: SAS sample statistic functions

SAS sample statistic functions

SAS Tips: The LENGTH statement

The LENGTH statement

SAS Tips: Using AUTOEXEC.SAS to customise your session

The autoexec file contains SAS statements that are executed automatically when you invoke SAS.

SAS Tips: using SAS variable lists

SAS supports three types of abbreviated variable lists, numbered range lists (specified using one dash), name range lists (specified using two dashes), and special name lists.

SAS Tips: Verifying the check digit in Swedish national ID numbers

A desscription of how the check digit is calculated and a SAS macro for doing it.

SAS Tips: Working with dates

About SAS date values, reading dates, converting character or numeric variables to SAS date variables.