Are you learning how to clean data?
Other than that, this would be an exercise in futility.
My suggestion would be to dump the file to Excel and clean it up by hand.
There's not a heck of a lot of benefit to reading in a file of this nature, besides learning. It wouldn't be acceptable for a process that needs to be repeated on any sort of regular basis so it's most likely a one time import.
Log the changes you make in Excel in a document, but fighting with this file will take more effort than it's worth IMO.
The following worked for me. It simply includes a combination of tabs and pipes as delimiters:
data want; infile '/folders/myfolders/magnolia.txt' dlm='097c'x dsd; informat prefix $2.; informat name $25.; informat sci_name $25.; input prefix name sci_name sale_qty remnant code $ color $; run;
Art, CEO, AnalystFinder.com
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.