06-17-2012 04:51 AM
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
DBMS=CSV REPLACE; GETNAMES=YES; DATAROW=2; RUN;
06-17-2012 10:09 PM
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' ;
06-17-2012 11:06 PM
|ratio||ratio after import|
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.
06-18-2012 10:48 AM
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)