<?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: export to delimited file in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/export-to-delimited-file/m-p/209944#M51989</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you !&lt;/P&gt;&lt;P&gt;Sorry I must have copied and pasted incorrectly.&lt;/P&gt;&lt;P&gt;the DSD option worked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 May 2015 21:28:47 GMT</pubDate>
    <dc:creator>Mariaho</dc:creator>
    <dc:date>2015-05-06T21:28:47Z</dc:date>
    <item>
      <title>export to delimited file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/export-to-delimited-file/m-p/209942#M51987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm using the following to create a text delimited file. However for the fields that have null value, the output text file is generating a space between the delimiters. Is there any way to get rid of the blanks ? &lt;/P&gt;&lt;P&gt;I cannot use proc export as I cannot customise the header and trailer (or is it possible to customise headers/trailers in proc export ?)&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp; ! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; dt= datetime();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format dt YMDHMS.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format Business_Date b8601da.; &lt;/P&gt;&lt;P&gt;&amp;nbsp; format OBS Z8.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format amount_SUM Z20.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain amount_SUM;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sas_extract_formatted end=EFIEOD NOBS=OBS; &lt;/P&gt;&lt;P&gt;&amp;nbsp; FILE&amp;nbsp; 'C:\Users\f051615\rawfile.txt' DLM='~' LINESIZE=1000;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Output Text File */ &lt;/P&gt;&lt;P&gt;&amp;nbsp; if _n_ = 1 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PUT "H~SASX~" Business_Date dt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; amount_SUM=sum(amount_SUM,amount_Final);&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*put (_all_)(+0);*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; PUT 'D~' &lt;/P&gt;&lt;P&gt;&amp;nbsp; Business_Date&lt;/P&gt;&lt;P&gt;&amp;nbsp; Month_Key&lt;/P&gt;&lt;P&gt;&amp;nbsp; Period_Id&lt;/P&gt;&lt;P&gt;&amp;nbsp; Customer_Id&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;end;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;if EFIEOD then do;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;PUT "T~" OBS CEA_SUM;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;end;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 04:50:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/export-to-delimited-file/m-p/209942#M51987</guid>
      <dc:creator>Mariaho</dc:creator>
      <dc:date>2015-05-06T04:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: export to delimited file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/export-to-delimited-file/m-p/209943#M51988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your code was either not correctly pasted or contains errors. The second PUT lacks a semicolon before the end;&lt;/P&gt;&lt;P&gt;I also think that you wanted to output amount_SUM instead of CEA_SUM in the final PUT&lt;/P&gt;&lt;P&gt;To suppress the blanks for empty strings, use the DSD option in the FILE statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 12:08:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/export-to-delimited-file/m-p/209943#M51988</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-05-06T12:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: export to delimited file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/export-to-delimited-file/m-p/209944#M51989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you !&lt;/P&gt;&lt;P&gt;Sorry I must have copied and pasted incorrectly.&lt;/P&gt;&lt;P&gt;the DSD option worked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 21:28:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/export-to-delimited-file/m-p/209944#M51989</guid>
      <dc:creator>Mariaho</dc:creator>
      <dc:date>2015-05-06T21:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: export to delimited file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/export-to-delimited-file/m-p/209945#M51990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then please mark the question as answered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 11:40:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/export-to-delimited-file/m-p/209945#M51990</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-05-07T11:40:58Z</dc:date>
    </item>
  </channel>
</rss>

