O'Reilly logo

Step-by-Step Programming with Base SAS 9.4, Second Edition, 2nd 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

Chapter 38
Modifying SAS Data Set Names
and Variable Attributes
Introduction to Modifying SAS Data Set Names and Variable Attributes . . . . . . 713
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714
Input Data Library for Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714
Renaming SAS Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714
Modifying Variable Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716
Understanding How to Modify Variable Attributes . . . . . . . . . . . . . . . . . . . . . . . . 716
Renaming Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716
Assigning, Changing, or Removing Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717
Assigning, Changing, or Removing Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723
DATASETS Procedure Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723
Learning More . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724
Introduction to Modifying SAS Data Set Names
and Variable Attributes
Purpose
SAS enables you to modify data set names and variable attributes without creating new
data sets. In this section, you will learn how to use statements in the DATASETS
procedure to perform the following tasks:
rename data sets
rename variables
modify variable formats
modify variable labels
This section focuses on using the DATASETS procedure to modify data sets. However,
you can also use some of the illustrated statements and options to modify other types of
SAS files.
713

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