BookmarkSubscribeRSS Feed
Mariloud
Obsidian | Level 7

I have a dataset with variables that contain other variable's values. For example part of address (AR 02531) is in another variable user_id as shown on the screenshot. I need help with putting the complete address as ''6208 Wright Mountains AR 02531''

Thank you!

1 REPLY 1
ballardw
Super User

I suggest providing an example of the file BEFORE you read it into SAS and how you read the data into into SAS.

That looks very likely to have been reading a delimited file, such as CSV, but not using the appropriate options to not use the delimiter when enclosed in quotes which is DSD on an Infile statement.

 

To provide the code used to read the the data copy the code from your editor and on the forum open a text box with the </> icon that appears above the message window and paste the text of the code. Do the the same with the first 5 or 6 lines of the file read.

 

Reading the data correctly often is easier than "fixing" data read incorrectly.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 579 views
  • 0 likes
  • 2 in conversation