<?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 produces &amp;quot;0&amp;quot; for blank or null values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-produces-quot-0-quot-for-blank-or-null-values/m-p/450836#M113577</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Its not the export,&amp;nbsp;check your HAVE2 data set. It has the periods as well.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Also, you may have the following set, that you'll need to reset:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;option missing='0';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Apr 2018 19:47:00 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-04-03T19:47:00Z</dc:date>
    <item>
      <title>PROC EXPORT produces "0" for blank or null values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-produces-quot-0-quot-for-blank-or-null-values/m-p/450795#M113559</link>
      <description>&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; have;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; mydate &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;date9.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ln_no $ state $ mydate &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;date9.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;datalines&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1123 AL 1jun2018&lt;/P&gt;
&lt;P&gt;1123 AZ&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; have2;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; have;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; date_yr_mth &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;yymmd7.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;date_yr_mth = mydate;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;date_yr_mth1 = put(date_yr_mth,&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;yymmd7.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;EXPORT&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;Outfile&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;= &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"\\MyDrive\have3.xlsb"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DATA&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;= have2 &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DBMS&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;= EXCELCS &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;REPLACE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;SHEET&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'Details'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;SERVER&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'server1'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Note the second value AZ has no date it is a blank.&amp;nbsp; When it exports it somehow gets a .&amp;nbsp; When it runs through our sharepoint server it is assigned a "0"&amp;nbsp; I tried something like this in the datastep if date_yr_mth = '0' or date_yr_mth = . then date_yr_mth = ' ';&amp;nbsp; Yet it still assigns a . or '0' when it runs.&amp;nbsp; Is there a way in the proc export itself to assign all null values as a true null.&amp;nbsp; I do not want it to display anything in the field.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 18:47:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-produces-quot-0-quot-for-blank-or-null-values/m-p/450795#M113559</guid>
      <dc:creator>Q1983</dc:creator>
      <dc:date>2018-04-03T18:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: PROC EXPORT produces "0" for blank or null values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-produces-quot-0-quot-for-blank-or-null-values/m-p/450836#M113577</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Its not the export,&amp;nbsp;check your HAVE2 data set. It has the periods as well.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Also, you may have the following set, that you'll need to reset:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;option missing='0';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 19:47:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-produces-quot-0-quot-for-blank-or-null-values/m-p/450836#M113577</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-03T19:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: PROC EXPORT produces "0" for blank or null values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-produces-quot-0-quot-for-blank-or-null-values/m-p/450960#M113617</link>
      <description>&lt;P&gt;If you want control of your process and have things done your way,&lt;/P&gt;
&lt;P&gt;TAKE CONTROL!&lt;/P&gt;
&lt;P&gt;This specifically precludes the use of something as crappy as .xlsb for data transfer.&lt;/P&gt;
&lt;P&gt;Do this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
format mydate date9.;
input ln_no $ state $ mydate date9.;
datalines;
1123 AL 1jun2018
1123 AZ
;
run;

options missing = '';

data _null_;
set have;
file '/$HOME/sascommunity/out.csv' dlm=',' dsd;
if _n_ = 1 then put 'ln_no,state,mydate';
put
  ln_no
  state
  mydate
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;instead.&lt;/P&gt;
&lt;P&gt;Since xlsb involves a Microsoft-supplied piece of software along the way, you'll never know what happens in there. Mostly something that will curl your toenails.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 07:49:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-EXPORT-produces-quot-0-quot-for-blank-or-null-values/m-p/450960#M113617</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-04-04T07:49:35Z</dc:date>
    </item>
  </channel>
</rss>

