Use of Multiple SET Statements

Live Online Training : SAS Programming with 50+ Case Studies

- Explain Programming Concepts in Simple English
- Live Projects
- Scenario Based Questions
- Job Placement Assistance
- Get 10% off till Oct 26, 2017
- Batch starts from October 28, 2017

In SAS, you can perform one-to-one reading with the help of multiple SET statements. It combines observations from two or more data sets into a single observation in a new data set.
DATA dat1;
INPUT id v1 v2;
1 10 100
2 15 150
3 20 200

DATA dat2;
INPUT id v3 v4;
1 1000 10000
2 1500 15000
3 2000 20000
4 800 30000

DATA dat3;
set dat1;
set dat2;
SAS : Multiple SET Statements
The observations are combined based on their relative position in the data set.

SAS Tutorials : 100 Free SAS Tutorials

About Author:

Deepanshu founded ListenData with a simple objective - Make analytics easy to understand and follow. He has close to 7 years of experience in data science and predictive modeling. During his tenure, he has worked with global clients in various domains like retail and commercial banking, Telecom, HR and Automotive.

While I love having friends who agree, I only learn from those who don't.

Let's Get Connected: Email | LinkedIn

Get Free Email Updates :
*Please confirm your email address by clicking on the link sent to your Email*

Related Posts:

2 Responses to "Use of Multiple SET Statements"

  1. The output will turn out to be different if:
    DATA dat3;

    set dat1 dat2;


    1. in this case datasets will append


Next → ← Prev