BookmarkSubscribeRSS Feed
teja04
Calcite | Level 5
Hi All,
I have two datasets (AAA, BBB). In dataset AAA has variables (AA, BB, CC, DD, EE, FF, P1, P2, P3, P4...P30).
In dataset BBB has variables ( AA, BB, CC, DD, EE, FF, (VALUE). I want to read the dataset by using variable.
Example: if dataset has variable (P1) then read dataset AAA, else if dataset has variable (VALUE) then read dataset BBB.
2 REPLIES 2
PeterClemmensen
Tourmaline | Level 20

What do you mean by 'read the data set'? And what if the variable has the value AA?

PaigeMiller
Diamond | Level 26

If I am understanding you properly:

 

Use PROC CONTENTS to determine which variable names are in the data set. Then you can determine which path to follow and which data set to read.

--
Paige Miller

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 933 views
  • 0 likes
  • 3 in conversation