Collectively, SAS statements are grouped together and compose a code block called SAS step. A SAS step can be either Data step or Procedure step. Initiated by the keyword DATA, Data steps creates a new SAS dataset, adding inline data values from the block, importing external data files, and/or applying data transformations. On the other hand, Procedure steps are initiated by the PROC keyword. This performs data manipulations, data reporting, and/or any other further data analysis. For example:


The example SAS program shown above comprises three SAS steps; the first being the data step, followed by two procedure steps. The data step creates a new SAS dataset named MyData. It reads data values provided through the CARDS statement. Internally SAS can handle only SAS datasets; any external datasets must be imported prior to any procedures. Subsequently, two procedure steps are executed using MyData. The PROC MEANS calculates basic summary statistics, and the PROC UNIVARIATE offers a more comprehensive analysis by providing a wider range of descriptive statistics.

Post a Comment

0 Comments