Using a DATA step, you can input the delimited data-fields as SAS CHARACTER type variables and use a function like COMPRESS to eliminate the quote marks and also use an INPUT function with BEST. to convert the fields to SAS NUMERIC variables.
90 data _null_;
91 infile cards dlm=',';
92 input (a c_b c_c c_d) ($) ;
93 b = input(compress(c_b,"'"),best.);
94 c = input(compress(c_c,"'"),best.);
95 d = input(compress(c_d,"'"),best.);
96 putlog _all_;
a='a' c_b='1.1' c_c='1.2' c_d='1.3' b=1.1 c=1.2 d=1.3 _ERROR_=0 _N_=1
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
Sorry, but I can't even read the data in as tab-delimited with the single quotes appearing as part of the variable. The file is tab-delimited, but it doesn't act like it. If I use the single quotes as delimiters and create dummy fields where the tabs are, those fields appear in the data set as \tab - so doesn't that verify that they are tabs?
Suggest you might get more effective feedback if you share some SAS-generated log output with your DATA step code that is not working. As suggested, you will need to input the data values into SAS CHARACTER variables and remove the surrounding quote-marks, then use the INPUT function to convert the CHARACTER variable to a NUMERIC variable.
For your diagnostic logic, suggest you add the following statement and run a few records:
OPTIONS OBS=nnn; /* set an input processing limit */
PUTLOG _ALL_; /* add to DATA step code after all INPUT processing */
"\tab" is an RTF control string for indicating a TAB. If you look at your tab-delimited file with NOTEPAD, you should see spaces and not \tab.... like this
My c:\temp\tab_dlm.txt file as it looks in Notepad (those spaces between each field are an expanded "tab" character '09'x -- which I can verify by looking at the input file with a hexadecimal viewer):
'aaa' 'something' 'something else'
'bbb' 'morestuff' 'even more'
It is sounding to me as though you need to work with Tech Support on this issue, since I'm not sure you actually have a tab-delimited file. Tech Support is best able to look at the contents of your input file to determine whether you have real tab characters (ASCII '09'x) or RTF control characters (\tab).
DSD seems to handle the single quotes for me. I have a tab-delimited file (without column names in row 1) stored in the file c:\temp\tab_dlm.txt. The fields are all surrounded by single quotes. This works for my data file. It should also work if a numeric variable is in quotes because the DSD option strips quotes and your informat would be used to read the field.
Since my system is Windows, I used the ASCII hex value for tab ('09'x) for the DLM= option. On an ASCII platform, the hexadecimal representation of a tab is '09'x. On an EBCDIC platform, the hexadecimal representation of a tab is a '05'x.