05-15-2014 09:03 AM
how do I get rid of quotes (") in the txt-file I export from SAS?
My SAS script produces a file which contains one column containig the varchar expression. This file should be exported to txt (without headers).
At the moment the exported data in txt looks like that:
"k123 123 some text"
"k456 456 some other text"
What I need is:
k123 123 some text
k456 456 some other text
IMPORTANT NOTE: every row is one variable (even if it contains spaces inside)
Thank you in advance.
05-15-2014 09:11 AM
What method are you using to get the data out? Perhaps post some code?
If you use datastep with file, and a put statement with your variable, you can put it out any way you like, with/without quotes, formatted etc.
attrib some_text format=$200.;
some_text="k123 123 some text"; output;
some_text="k456 456 some other text"; output;
05-15-2014 09:23 AM
Thank you for quick response.
I have the following code:
filename file_1 "c:\path~\file_1.txt";
file file_1 dsd dlm='';
05-15-2014 09:42 AM
Yes, you have the DLM='' statement on there. As your data contains spaces, SAS is helpfully quoting it. Remove the DLM= option and it should work correctly. You could also say DLM=','; to get the result.