Basic Concepts

Overview

In the SAS programs that you write, you might find that you need to reference the same variable, data set, or text string multiple times.
title "Total Sales for 2002";
data perm.sales2002;
   set perm.sales;
   if year(enddate)=2002;
run;
proc print data=perm.sales2002;
run;
Then, you might need to change the references in your program in order to reference a different variable, data set, or text string. Especially if your programs are lengthy, scanning for specific references and updating them manually can take a lot of time, and it is easy to overlook a reference that needs to be updated.
title "Total Sales for 2001";
data perm.sales2001;
   set perm.sales;
   if year(enddate)=2002;
run;
proc print data=perm.sales2001;
run;
If you ...

Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.