<?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: Problem with data after exporting to txt using data step in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-data-after-exporting-to-txt-using-data-step/m-p/205952#M51254</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_ ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set WORK.Files; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; file&amp;nbsp; outfile delimiter=',';&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;if _n_ = 1 then do; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;PUT 'A,B,C,D'; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;end;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;PUT A B C D;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A~B~C~D&lt;/P&gt;&lt;P&gt;F1,235, ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A~B~C~D&lt;/P&gt;&lt;P&gt;F1,235,,,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Jun 2015 08:32:04 GMT</pubDate>
    <dc:creator>Ypss</dc:creator>
    <dc:date>2015-06-15T08:32:04Z</dc:date>
    <item>
      <title>Problem with data after exporting to txt using data step</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-data-after-exporting-to-txt-using-data-step/m-p/205950#M51252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem - when I try to export a dataset to delimited txt file using data step export, I experience a small but annoying issue that is probably limited to this way of exporting a file because proc export does the job just fine.&amp;nbsp; Unfortunately I need to provide changes to this txt file that proc export can't do so using it is not the solution. So... the thing is - I have in my dataset columns that are always filled with some data and some that are not and in the txt file these empty cells look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;, ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want is ,,.&amp;nbsp; How can I remove this blank space betweem delimiter?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 06:36:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-data-after-exporting-to-txt-using-data-step/m-p/205950#M51252</guid>
      <dc:creator>Ypss</dc:creator>
      <dc:date>2015-06-15T06:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data after exporting to txt using data step</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-data-after-exporting-to-txt-using-data-step/m-p/205951#M51253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would really help if you would post your code - especially the bit where you're actually writing to the text file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So just purely guessing here: &lt;/P&gt;&lt;P&gt;You might be looking for something like PUT VAR1 +(-1) ',' VAR2 .....;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 07:54:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-data-after-exporting-to-txt-using-data-step/m-p/205951#M51253</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-06-15T07:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data after exporting to txt using data step</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-data-after-exporting-to-txt-using-data-step/m-p/205952#M51254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_ ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set WORK.Files; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; file&amp;nbsp; outfile delimiter=',';&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;if _n_ = 1 then do; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;PUT 'A,B,C,D'; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;end;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;PUT A B C D;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A~B~C~D&lt;/P&gt;&lt;P&gt;F1,235, ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A~B~C~D&lt;/P&gt;&lt;P&gt;F1,235,,,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 08:32:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-data-after-exporting-to-txt-using-data-step/m-p/205952#M51254</guid>
      <dc:creator>Ypss</dc:creator>
      <dc:date>2015-06-15T08:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data after exporting to txt using data step</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-data-after-exporting-to-txt-using-data-step/m-p/205953#M51255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you're looking for "DSD".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods _all_ close;&lt;/P&gt;&lt;P&gt;ods listing;&lt;/P&gt;&lt;P&gt;options missing='';&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.class;&lt;/P&gt;&lt;P&gt;&amp;nbsp; file print delimiter=',' DSD;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if _n_=2 then call missing(Sex,Age,Name);&lt;/P&gt;&lt;P&gt;&amp;nbsp; put Height Sex Age Name Weight;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 10:05:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-data-after-exporting-to-txt-using-data-step/m-p/205953#M51255</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-06-15T10:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with data after exporting to txt using data step</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-data-after-exporting-to-txt-using-data-step/m-p/205954#M51256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's it! Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 10:09:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-data-after-exporting-to-txt-using-data-step/m-p/205954#M51256</guid>
      <dc:creator>Ypss</dc:creator>
      <dc:date>2015-06-15T10:09:53Z</dc:date>
    </item>
  </channel>
</rss>

