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!
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.
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 25. Read more here about why you should contribute and what is in it for you!
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.