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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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