Thursday, March 10, 2011

What the Heck is a Data Step?

It is a basic building block of SAS programming. It creates the data sets that are used in a SAS program’s analysis and reporting procedures.

The Data Step is represented by three components:

1. The input or raw data.

2. The data step statements – DATA statement, INPUT statement and more statements.

3. The output or SAS data set.

Temporary versus Permanent SAS Data Sets

The following is an example of a DATA step that creates the temporary data set WEIGHT_CLUB.

data weight_club;

input IdNumber Name $ 6--20 Team $ 22--27 StartWeight EndWeight;

datalines;

1023 David Shaw red 189 165

1049 Amelia Serrano yellow 145 124

1219 Alan Nance red 210 192

1246 Ravi Sinha yellow 194 177

1078 Ashley McKnight red 127 118

1221 Jim Brown yellow 220 ;

run;

No comments:

Post a Comment