Using PROC DATASETS to Modify SAS Data Sets - SAS Programming

PROC DATASETS can also perform a number of housekeeping operations on a data set itself, as opposed to the variables that make up the data set.In this example, you use PROC DATASETS to rename a SAS data set.First, here is the inefficient way to do it

Example– INEFFICIENT

DATA NEWNAME;
SET OLDNAME;
RON;

Here,a new data set is created for the sole purpose of renaming an existing one. Wasteful. Here is the better way:
Example – EFFICIENT

PROC DATASETS;
CHANGE OLDNAME=NEWNAME;
RUN;

In the efficient program, you avoid having to make a pass through the entire data set.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

SAS Programming Topics