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

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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