O'Reilly logo

SAS Certification Prep Guide: Base Programming for SAS 9, Third Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

SAS Programs

You can use SAS programs to access, manage, analyze, or present your data. Let's begin by looking at a simple SAS program.

A Simple SAS Program

This program uses an existing SAS data set to create a new SAS data set containing a subset of the original data set. It then prints a listing of the new data set using PROC PRINT. A SAS data set is a data file that is formatted in a way that SAS can understand.
data sasuser.admit2;
   set sasuser.admit;
   where age>39;
run;
proc print data=sasuser.admit2;
run;
Let's see how this program works.

Components of SAS Programs

The sample SAS program contains two steps: a DATA step and a PROC step.
 data sasuser.admit2; set sasuser.admit; where age>39; run; proc print data=sasuser.admit2; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required