Hi everyone,
I'm trying to import a CSV file in SAS via clicking on 'file' then 'import data' but once the file is in SAS it gives me a different value.
How can I import a CSV file and keep the same values?
Thanks!
Write your own data step, and use that. With the automated helpers (either the import wizard of Enterprise Guide or proc import), changes in the data can (and will) cause unwanted changes in the structure.
If your original task runs a proc import, copy the data step code from the log, adapt (and simplify!) it is as needed, and use that in the future.
If values are imported wrongly, please supply example data from the csv file (use the [i] button for posting textual data), and tell us which column was incorrectly read.
CSV file RIC Price Volume AEIS.O 14.07 1500 SAS file RIC Price Volume AEIS.O 1 2
Here's an example of what happens to an observation when I import the CSV file.
I don't use any particular code, I just use the import data function from the file menu
Thanks for your help!
Please show the REAL content of the csv file. It should look something like this:
RIC,Price,Volume AEIS.O,14.07,1500
NEVER (and I mean never as in "not even when hell has frozen over so hard that the brimstone is superconducting") inspect a csv file with Excel or similar, as you will only see what Excel thinks of the data. Use a proper text editing/viewing tool, like notepad++.
Which import wizard do you use? That of Base SAS, SAS Studio, or Enterprise Guide?
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!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.