<?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 Output missing values as length 0 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Output-missing-values-as-length-0/m-p/920572#M362561</link>
    <description>&lt;P&gt;&amp;nbsp;A business partner requires a pipe-delimited (|) record format where missing values are represented as a zero length field or two consecutive pipe characters (||).&amp;nbsp; We have tried formats, compress() function, and system option MISSING='' to force length zero for missing values in a PUT statement but the record always returns a single blank space between two pipe characters (| |).&amp;nbsp; Is there a way to remove the single blank space for output without having to remove blank spaces after the file is created with a utility program (e.g. PowerShell)?&amp;nbsp; We are trying to automate this process if possible.&lt;/P&gt;</description>
    <pubDate>Sat, 16 Mar 2024 18:44:42 GMT</pubDate>
    <dc:creator>Jim_Cooper_hmsa</dc:creator>
    <dc:date>2024-03-16T18:44:42Z</dc:date>
    <item>
      <title>Output missing values as length 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Output-missing-values-as-length-0/m-p/920572#M362561</link>
      <description>&lt;P&gt;&amp;nbsp;A business partner requires a pipe-delimited (|) record format where missing values are represented as a zero length field or two consecutive pipe characters (||).&amp;nbsp; We have tried formats, compress() function, and system option MISSING='' to force length zero for missing values in a PUT statement but the record always returns a single blank space between two pipe characters (| |).&amp;nbsp; Is there a way to remove the single blank space for output without having to remove blank spaces after the file is created with a utility program (e.g. PowerShell)?&amp;nbsp; We are trying to automate this process if possible.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Mar 2024 18:44:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Output-missing-values-as-length-0/m-p/920572#M362561</guid>
      <dc:creator>Jim_Cooper_hmsa</dc:creator>
      <dc:date>2024-03-16T18:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Output missing values as length 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Output-missing-values-as-length-0/m-p/920573#M362562</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1597"&gt;@Jim_Cooper_hmsa&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsref/n15o12lpyoe4gfn1y1vcp6xs6966.htm#n1ckqb7ej5xd6hn13ufvkf2vobhp" target="_blank" rel="noopener"&gt;DSD option&lt;/A&gt; to the FILE statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;93    data _null_;
94    file log dlm='|' dsd;
95    x='ABC';
96    y=' ';
97    z='DEF';
98    m=.;
99    n=123;
100   put x y z m n;
101   run;

ABC||DEF||123
NOTE: DATA statement used (Total process time):&lt;/PRE&gt;
&lt;P&gt;The same code without the DSD option yields&lt;/P&gt;
&lt;PRE&gt;ABC| |DEF|.|123&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Mar 2024 19:20:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Output-missing-values-as-length-0/m-p/920573#M362562</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2024-03-16T19:20:21Z</dc:date>
    </item>
  </channel>
</rss>

