In the data file Exe2_Data11.txt, the field indicates contains a street address and a person who lives at that address, age and gender. Create a SAS data set that contains one
observation for each person who lives at a specific address. The finished SAS data set
looks like this:
30 Daguilar St
15 Fuk Hi St
20 San Fat St
78 Stanley St
This is in essence the same question as posted here:
data want; infile "path_to_your_file" dlm="," dsd truncover; length address $100 name $50 age 8 gender $1 ; retain address; input @; if countw(_infile_,",") > 1 then do; input name age gender; output; end; else input address $100.; run;
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
For SAS newbies, this video is a great way to get started. James Harroun walks through the process using SAS Studio for SAS OnDemand for Academics, but the same steps apply to any analytics project.
Find more tutorials on the SAS Users YouTube channel.