<?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: Handling Missing values in file writer transformation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Handling-Missing-values-in-file-writer-transformation/m-p/730846#M227632</link>
    <description>&lt;P&gt;according to this:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-produces-quot-0-quot-for-blank-or-null-values/td-p/450795" target="_blank"&gt;Solved: PROC EXPORT produces "0" for blank or null values - SAS Support Communities&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"file writer transformation" is a "PROC EXPORT" and OPTIONS MISSING sets the character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I didn't test this but if you can set this before you run the "file writer transformation":&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options missing=%sysfunc(byte(255));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I got this from Joe:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/40866378/how-to-set-missing-values-to-null-in-sas" target="_blank"&gt;how to set missing values to NULL in SAS - Stack Overflow&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Apr 2021 20:33:10 GMT</pubDate>
    <dc:creator>PhilC</dc:creator>
    <dc:date>2021-04-01T20:33:10Z</dc:date>
    <item>
      <title>Handling Missing values in file writer transformation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Handling-Missing-values-in-file-writer-transformation/m-p/730755#M227590</link>
      <description>&lt;P&gt;While using file writer transformation to export data in csv file with semicolon as delimiter, missing values are exported as dot.&lt;/P&gt;
&lt;P&gt;but instead there should be two consecutive delimiters. Any suggestion to get the expected result?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="neha11_ch_0-1617291774540.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56805iEE532EFE4361C9D9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="neha11_ch_0-1617291774540.png" alt="neha11_ch_0-1617291774540.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 15:44:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Handling-Missing-values-in-file-writer-transformation/m-p/730755#M227590</guid>
      <dc:creator>neha11_ch</dc:creator>
      <dc:date>2021-04-01T15:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Missing values in file writer transformation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Handling-Missing-values-in-file-writer-transformation/m-p/730846#M227632</link>
      <description>&lt;P&gt;according to this:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-produces-quot-0-quot-for-blank-or-null-values/td-p/450795" target="_blank"&gt;Solved: PROC EXPORT produces "0" for blank or null values - SAS Support Communities&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"file writer transformation" is a "PROC EXPORT" and OPTIONS MISSING sets the character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I didn't test this but if you can set this before you run the "file writer transformation":&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options missing=%sysfunc(byte(255));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I got this from Joe:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/40866378/how-to-set-missing-values-to-null-in-sas" target="_blank"&gt;how to set missing values to NULL in SAS - Stack Overflow&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 20:33:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Handling-Missing-values-in-file-writer-transformation/m-p/730846#M227632</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2021-04-01T20:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Missing values in file writer transformation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Handling-Missing-values-in-file-writer-transformation/m-p/730924#M227670</link>
      <description>&lt;P&gt;A dot is the default character printed for missing numerical values. I don't have access to DIS in the moment so can't check if the file writer transformation provides any setting to change this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there isn't a setting/option to change the value for missing then what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15329"&gt;@PhilC&lt;/a&gt;&amp;nbsp;suggests should work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to implement clean then have in the pre-code of the transformation:&lt;/P&gt;
&lt;PRE&gt;%let sv_missing=%sysfunc(getoption(missing,KEYWORD));&lt;BR /&gt;options missing=' ';&lt;/PRE&gt;
&lt;P&gt;And in the post-code:&lt;/P&gt;
&lt;PRE&gt;options &amp;amp;sv_missing;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Apr 2021 14:03:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Handling-Missing-values-in-file-writer-transformation/m-p/730924#M227670</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-04-05T14:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Missing values in file writer transformation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Handling-Missing-values-in-file-writer-transformation/m-p/731341#M227809</link>
      <description>&lt;P&gt;Thanks for the revert. Below piece of code is displaying space instead of . for missing numeric value.&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;options missing=%sysfunc(byte(255));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;The expected result is two consecutive delimiters. No space in between. Can you may be help me on this?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Apr 2021 12:23:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Handling-Missing-values-in-file-writer-transformation/m-p/731341#M227809</guid>
      <dc:creator>neha11_ch</dc:creator>
      <dc:date>2021-04-05T12:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Missing values in file writer transformation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Handling-Missing-values-in-file-writer-transformation/m-p/731343#M227811</link>
      <description>&lt;P&gt;I assume this is not really a programming question (you didn't post any code that you ran and "file writer" is not a term used by programmers.)&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you using some tool to generate this file?&amp;nbsp; If so what tool?&amp;nbsp; How did you trigger it?&amp;nbsp; What options does the tool provide? Which did you use? Does it produce a SAS log that you can share so we can see what code it ran?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does the tool have an EXPORT feature instead of a FILE WRITER feature?&amp;nbsp; If so then that would probably be more appropriate for generating a CSV file, so it might have the functionality to generate a proper CSV file.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Apr 2021 12:37:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Handling-Missing-values-in-file-writer-transformation/m-p/731343#M227811</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-04-05T12:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Missing values in file writer transformation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Handling-Missing-values-in-file-writer-transformation/m-p/731358#M227816</link>
      <description>&lt;P&gt;OK, I'm sorry, I am out of my depth.&amp;nbsp; Your system's encoding may come in to play on this.&amp;nbsp; I naively suspect that the solution I linked to on Stack Overflow may have been using &lt;STRONG&gt;wlatin&lt;/STRONG&gt; encoding but we have not established what encoding your system or DI uses, if it is different.&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;did you try the other suggestion?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options missing="%sysfunc(byte(0))";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Apr 2021 13:46:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Handling-Missing-values-in-file-writer-transformation/m-p/731358#M227816</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2021-04-05T13:46:22Z</dc:date>
    </item>
  </channel>
</rss>

