<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Proc Export adding extra quotation marks in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-adding-extra-quotation-marks/m-p/90023#M25692</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;However, if you want to take advantage of proc export's obtaining and outputting the variable name(s) on the first row, it is easy to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After running proc export, press function key F4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will retrieve the statement that was submitted.&amp;nbsp; If your variable was called text, there will be a line towards to bottom of the program that shows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;put text $;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you change that to, say:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;put text char30.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you will get the desired output file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Aug 2012 17:41:14 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2012-08-10T17:41:14Z</dc:date>
    <item>
      <title>Proc Export adding extra quotation marks</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-adding-extra-quotation-marks/m-p/90021#M25690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to export a SAS dataset to a text file but when I use proc export it is adding extra quotation marks.&amp;nbsp; I need the output file to look just like the dataset.&amp;nbsp; An example of what the dataset looks like and what the text file looks like after it has been exported are as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dataset example (each line is a different observation):&lt;/P&gt;&lt;P&gt;"Text stuff&lt;/P&gt;&lt;P&gt;Other text;&lt;/P&gt;&lt;P&gt;More text&lt;/P&gt;&lt;P&gt;Some more text"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output file example after using proc export:&lt;/P&gt;&lt;P&gt;"""Text stuff"&lt;/P&gt;&lt;P&gt;Other text stuff;&lt;/P&gt;&lt;P&gt;More text&lt;/P&gt;&lt;P&gt;"Some more text"""&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example of proc export code:&lt;/P&gt;&lt;P&gt;proc export data=test dbms=DLM outfile="textfile.txt" replace;&lt;/P&gt;&lt;P&gt;&amp;nbsp; delimiter='0a'x;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see it inserts extra quotation marks at the beginning on line 1, adds a quotation mark at the end of line 1, adds a quotation mark at the beginning of line 4, and extra quotation marks at the end of line 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anyway to prevent this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 17:12:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-adding-extra-quotation-marks/m-p/90021#M25690</guid>
      <dc:creator>lsirakos</dc:creator>
      <dc:date>2012-08-10T17:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export adding extra quotation marks</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-adding-extra-quotation-marks/m-p/90022#M25691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nevermind, found a way to get this to work without using proc export.&amp;nbsp; Solution is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname ssd '[drive]:\[your_folder]\proj\' ; &lt;BR /&gt;data _null_ ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* No SAS data set is created */ &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set ssd.income ; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FILE&amp;nbsp; '[drive]:\[your_folder]\rawfile.txt' ;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Output Text File */ &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PUT var1 ; &lt;BR /&gt;run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;via:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.ciser.cornell.edu/FAQ/SAS/write_delimited_file.shtml"&gt;http://www.ciser.cornell.edu/FAQ/SAS/write_delimited_file.shtml&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 17:17:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-adding-extra-quotation-marks/m-p/90022#M25691</guid>
      <dc:creator>lsirakos</dc:creator>
      <dc:date>2012-08-10T17:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export adding extra quotation marks</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-adding-extra-quotation-marks/m-p/90023#M25692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;However, if you want to take advantage of proc export's obtaining and outputting the variable name(s) on the first row, it is easy to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After running proc export, press function key F4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will retrieve the statement that was submitted.&amp;nbsp; If your variable was called text, there will be a line towards to bottom of the program that shows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;put text $;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you change that to, say:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;put text char30.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you will get the desired output file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 17:41:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-adding-extra-quotation-marks/m-p/90023#M25692</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-10T17:41:14Z</dc:date>
    </item>
  </channel>
</rss>

