Hi when i import a large file to SAS it replaces some of the variables with 1,2 , 3, etc. upto 9. I would like the original vaues ie: 1222, 6335, 3245 to remain as they are.
How do I ensure the SAS does not alter my variables?
The current command I am using is:
PROC IMPORT OUT= WORK.accounting
DATAFILE= "C:\Users\253507F\Desktop\accvariables.csv"
DBMS=CSV REPLACE; GETNAMES=YES; DATAROW=2; RUN;
I have experienced a similar problem when uploading CSV files! Very interested to hear problems to solve for this
I don't understand what you mean ?
I notice you used DBMS=CSV ,that means SAS will take comma as a delimiter , and data 1222, 6335, 3245 contains comma , Maybe SAS take it as a delimiter .
So try to use DBMS=dlm ; delimiter='your-delimiter' ;
Ksharp
ratio | ratio after import |
0.000018062 | 1 |
-0.000015875 | 2 |
0.000004338 | 3 |
-0.000132 | |
0.000316 | 1 |
-0.000005684 | 1 |
-0.000173 | 2 |
-0.00006028 | 1 |
This is what I mean. The actual values are translated into digits between 1-9.
I used DBMS=dlm ; delimiter='your-delimiter' ; and this does not provide me with my table. Rather than having 18 rows by 23 columns, my table 2 columns with many rows via your method.
It is hard to say something.
Can you post some sample file of yours . I can test it whether it is right.
When you run your example IMPORT code there should be datastep code in the log. If you would provide that we can probably provide better help. I suspect that the culprit will turn out to be the default GUESSINGROWS value of 20. If the first 20 rows have values that are integers the import procedure will assume the others are.
Try adding guesssingrows=32767 (this is the largest number of rows SAS will examine for CSV to determine range and types of values)
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.