<?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: E8601dt informat does not like missing values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/E8601dt-informat-does-not-like-missing-values/m-p/713022#M219912</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;But I am getting unexpected results (9.4M2 under Windows). The second &lt;FONT face="courier new,courier"&gt;input&lt;/FONT&gt; always generates a note even if the test is false (&lt;FONT face="courier new,courier"&gt;putlog&lt;/FONT&gt; is not executed).&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;: Good news: It's not the second, but the &lt;EM&gt;first&lt;/EM&gt; &lt;FONT face="courier new,courier"&gt;input&lt;/FONT&gt; that (correctly) generated the note&lt;/P&gt;
&lt;PRE&gt;NOTE: Invalid data for DATE2 in line 43 25-25.&lt;/PRE&gt;
&lt;P&gt;when trying to read the (second) comma into a numeric variable using formatted input.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jan 2021 10:15:02 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2021-01-21T10:15:02Z</dc:date>
    <item>
      <title>E8601dt informat does not like missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/E8601dt-informat-does-not-like-missing-values/m-p/711954#M219397</link>
      <description>&lt;P&gt;This seems to me quite peculiar. When reading datetimes with E8601DT. informat like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sas"&gt;data test;
length date1 8 date2 8 date3 8;
informat date1 e8601dt. date2 e8601dt. date3 e8601dt.;
infile datalines DSD MISSOVER;
input date1 date2 date3;
cards;
2020-09-27 00:00:01.000,,2020-09-27 00:00:00.000
;
run;&lt;/LI-CODE&gt;&lt;P&gt;...I'm getting a note:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000"&gt;NOTE: Invalid data for date2 in line 34 25-25.&lt;/FONT&gt;&lt;BR /&gt;With the whole dataset I'm eventually getting a WARNING that there were too many of these cases throughout the file. I don't want to supress these warnings, because I do not trust that the source too much. I just would like SAS to acknowledge that the missing value is fine and carry on.&lt;/P&gt;&lt;P&gt;Just like it does with other informats, like datetime22. which does not seem to have any issues with missing values:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
length date1 8 date2 8 date3 8;
informat date1 datetime22. date2 datetime22. date3 datetime22.;
infile datalines DSD MISSOVER;
input date1 date2 date3;
cards;
09sep2020 00:00:01.000,,09sep2020 00:00:00.000
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Do you have any suggestions?&lt;BR /&gt;&lt;FONT size="2"&gt;(SAS version: 9.4_M6)&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 08:42:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/E8601dt-informat-does-not-like-missing-values/m-p/711954#M219397</guid>
      <dc:creator>waveson</dc:creator>
      <dc:date>2021-01-21T08:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: E8601dt informat does not like missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/E8601dt-informat-does-not-like-missing-values/m-p/712930#M219866</link>
      <description>&lt;P&gt;These formats are recent, and you found a defect.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Report to SAS Tech Support so they can open a defect entry.&lt;/P&gt;
&lt;P&gt;2. I tried 100k values and still don't get a warning. How many missing values do you have?&lt;/P&gt;
&lt;P&gt;3. To work around the error, something like this should work:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data T;
  informat DATE1 DATE2 DATE3 e8601dt.;
  array DT[*] DATE1-DATE3;
  infile cards dsd missover;
  do I=1 to dim(DT);
    input DT[I] 1. @;   
   &lt;FONT color="#000000"&gt; if DT[I]=2 then do; &lt;/FONT&gt;
      putlog DT[I]=; 
      input +(-1) DT[I] @;  
      putlog DT[I]=; 
    end;
  end;
cards;
2020-09-27 00:00:01.000,,2020-09-27 00:00:00.000
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But I am getting unexpected results (9.4M2 under Windows). The second &lt;FONT face="courier new,courier"&gt;input&lt;/FONT&gt; always generates a note even if the test is false (&lt;FONT face="courier new,courier"&gt;putlog&lt;/FONT&gt; is not executed).&lt;/P&gt;
&lt;P&gt;If I replace the test with&amp;nbsp; &amp;nbsp;&lt;FONT face="courier new,courier"&gt;if 0&lt;/FONT&gt;&amp;nbsp; &amp;nbsp;then no note is generated.&lt;/P&gt;
&lt;PRE&gt;30         data T;
31           informat DATE1 DATE2 DATE3 e8601dt.;
32           array DT[*] DATE1-DATE3;
33           infile cards dsd missover;
34           do I=1 to dim(DT);
35             input DT[I] 1. @;
36            &lt;FONT color="#0000FF"&gt; if DT[I]=2 then do;&lt;/FONT&gt;
37               putlog DT[I]=;
38               input +(-1) DT[I] @;
39               putlog DT[I]=;
40             end;
41           end;
42         cards;

DATE1=2
DATE1=1916784001
NOTE: Invalid data for DATE2 in line 43 25-25.
DATE3=2
DATE3=1916784000
RULE:      ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0                     
43         2020-09-27 00:00:01.000,,2020-09-27 00:00:00.000
DATE1=1916784001 DATE2=. DATE3=1916784000 I=4 _ERROR_=1 _N_=1
NOTE: The data set WORK.T has 1 observations and 4 variables.
NOTE: Compressing data set WORK.T increased size by 100.00 percent. 
      Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: DATA statement used (Total process time):
      real time           0.07 seconds
      user cpu time       0.00 seconds
44         run;

45         
46         data T;
47           informat DATE1 DATE2 DATE3 e8601dt.;
48           array DT[*] DATE1-DATE3;
49           infile cards dsd missover;
50           do I=1 to dim(DT);
51             input DT[I] 1. @;
52             &lt;FONT color="#0000FF"&gt;if 1=2 then do;&lt;/FONT&gt;
53               putlog DT[I]=;
54               input +(-1) DT[I] @;
55               putlog DT[I]=;
56             end;
57           end;
58         cards;

NOTE: The data set WORK.T has 1 observations and 4 variables.
NOTE: Compressing data set WORK.T increased size by 100.00 percent. 
      Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: DATA statement used (Total process time):
      real time           0.07 seconds
      &lt;/PRE&gt;
&lt;P&gt;That's weird.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 00:33:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/E8601dt-informat-does-not-like-missing-values/m-p/712930#M219866</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-01-21T00:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: E8601dt informat does not like missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/E8601dt-informat-does-not-like-missing-values/m-p/712982#M219887</link>
      <description>&lt;P&gt;Unfortunately the problem can be reproduced using 9.4m7:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: Invalid data for date2 in line 34 25-25.
REGEL:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0                     
34         2020-09-27 00:00:01.000,,2020-09-27 00:00:00.000
date1=1916784001 date2=. date3=1916784000 _ERROR_=1 _N_=1
NOTE: The data set WORK.TEST has 1 observations and 3 variables.
NOTE:  Verwendet wurde: DATA statement - (Gesamtverarbeitungszeit):
      real time           0.01 seconds
      cpu time            0.01 seconds
      

35         ;
36         
37         %put &amp;amp;=SYSVLONG;
SYSVLONG=9.04.01M7P080520&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Jan 2021 06:03:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/E8601dt-informat-does-not-like-missing-values/m-p/712982#M219887</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-01-21T06:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: E8601dt informat does not like missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/E8601dt-informat-does-not-like-missing-values/m-p/713014#M219906</link>
      <description>&lt;P&gt;I also consider this a bug, so open a track with Technical Support.&lt;/P&gt;
&lt;P&gt;Here is a workaround that can help for the moment:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
invalue my8601dt
  " " = .
  other = [e8601dt.]
;
run;

data test;
length date1 8 date2 8 date3 8;
informat date1 date2 date3 my8601dt.;
infile datalines dsd truncover;
input date1 date2 date3;
cards;
2020-09-27 00:00:01.000,,2020-09-27 00:00:00.000
;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Jan 2021 09:01:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/E8601dt-informat-does-not-like-missing-values/m-p/713014#M219906</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-01-21T09:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: E8601dt informat does not like missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/E8601dt-informat-does-not-like-missing-values/m-p/713022#M219912</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;But I am getting unexpected results (9.4M2 under Windows). The second &lt;FONT face="courier new,courier"&gt;input&lt;/FONT&gt; always generates a note even if the test is false (&lt;FONT face="courier new,courier"&gt;putlog&lt;/FONT&gt; is not executed).&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;: Good news: It's not the second, but the &lt;EM&gt;first&lt;/EM&gt; &lt;FONT face="courier new,courier"&gt;input&lt;/FONT&gt; that (correctly) generated the note&lt;/P&gt;
&lt;PRE&gt;NOTE: Invalid data for DATE2 in line 43 25-25.&lt;/PRE&gt;
&lt;P&gt;when trying to read the (second) comma into a numeric variable using formatted input.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 10:15:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/E8601dt-informat-does-not-like-missing-values/m-p/713022#M219912</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-01-21T10:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: E8601dt informat does not like missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/E8601dt-informat-does-not-like-missing-values/m-p/713286#M220021</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt; It's not the second, but the&amp;nbsp;first&amp;nbsp;&lt;FONT face="courier new,courier"&gt;input&lt;/FONT&gt;&amp;nbsp;that (correctly) generated the note&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Ah yes! Thank you!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 04:40:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/E8601dt-informat-does-not-like-missing-values/m-p/713286#M220021</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-01-22T04:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: E8601dt informat does not like missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/E8601dt-informat-does-not-like-missing-values/m-p/713316#M220043</link>
      <description>I have just opened a track at SAS Tech Support.&lt;BR /&gt;I have also used &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt; 's suggestion as a temporary solution in my project.&lt;BR /&gt;&lt;BR /&gt;Thanks everyone!</description>
      <pubDate>Fri, 22 Jan 2021 09:49:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/E8601dt-informat-does-not-like-missing-values/m-p/713316#M220043</guid>
      <dc:creator>waveson</dc:creator>
      <dc:date>2021-01-22T09:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: E8601dt informat does not like missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/E8601dt-informat-does-not-like-missing-values/m-p/725117#M225188</link>
      <description>&lt;P&gt;I have received a response from SAS tech support:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Fixing that issue is on the list for the next maintenance - we still cannot give any date&amp;nbsp;for the release of that version.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 13:04:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/E8601dt-informat-does-not-like-missing-values/m-p/725117#M225188</guid>
      <dc:creator>waveson</dc:creator>
      <dc:date>2021-03-10T13:04:41Z</dc:date>
    </item>
  </channel>
</rss>

