Building Blocks in SAS

There are two most commonly used block in SAS codes

1. DATASTEP
2. PROCSTEP


DATASTEP- Datastep is used to create or modify dataset. Datastep
always starts with the keyword data. Every step written inside datastep should ends with semicolon(;). In Every Datastep the last line will always be the "run;" statement.

Example-

DATA A;
SET SASUSER.ADMIT;
RUN;

This Datastep will create a new dataset named as "A" in worklibrary and copy all the data from ADMIT dataset of SASUSER library.

PROCSTEP- Proc stands for Procedure, Procstep is used to perform any operation on data.There are many predefined procedures are available in SAS which are used to call in our program as needed.

Example-

PROC PRINT DATA=SASUSER.ADMIT;
RUN;

This PROCSTEP will print all the records from the ADMIT Dataset of SASUSER library.