<?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: Incorrect values is datasets imported from txt in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-values-is-datasets-imported-from-txt/m-p/571304#M12143</link>
    <description>&lt;P&gt;If you use one of the ANYDT.... informats to read dates that are early in the month then it must guess whether it should use MDY or DMY order.&amp;nbsp; Which one it chooses is probably determined by some type of setting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you think that 11/06 means the 11th of June instead of November 6th then you should read the date value with DDMMYY informat and then your code will not depend on who runs it (or where they live).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please show the actual lines from the text file (not a photograph of what it looks like after it has been read by a spreadsheet program) so we can see what the values actually look like. Use the Insert Code button in the editor to open a pop window that you can paste the lines into so that the spaces are not managed by the forum editor.&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jul 2019 03:27:46 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-07-05T03:27:46Z</dc:date>
    <item>
      <title>Incorrect values is datasets imported from txt</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-values-is-datasets-imported-from-txt/m-p/571291#M12137</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I´m trying to import data from .TXT file to dataset. The original data has the following format:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Original data from .TXT" style="width: 492px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30762i757EFD5A0E1B3750/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="Original data from .TXT" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Original data from .TXT&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I´m using the following code:&lt;/P&gt;&lt;P&gt;DATA teste;&lt;BR /&gt;LENGTH&lt;BR /&gt;LOG_ID 8&lt;BR /&gt;LOG_DH_INICIO 8&lt;BR /&gt;LOG_DH_FIM 8&lt;BR /&gt;&amp;nbsp;LOG_ID_PROPOSTA 8&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FORMAT&lt;BR /&gt;LOG_ID BEST18.&lt;BR /&gt;LOG_DH_INICIO DATETIME18.&lt;BR /&gt;LOG_DH_FIM DATETIME18.&lt;BR /&gt;LOG_NM_POLITICA $CHAR14.&lt;BR /&gt;LOG_ID_PROPOSTA BEST13.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;INFORMAT&lt;BR /&gt;LOG_ID BEST18.&lt;BR /&gt;LOG_DH_INICIO DATETIME18.&lt;BR /&gt;LOG_DH_FIM DATETIME18.&lt;BR /&gt;LOG_ID_PROPOSTA BEST13.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;INFILE 'xxxxxxxxxxxxxxxxx'&lt;BR /&gt;LRECL=32767&lt;BR /&gt;FIRSTOBS=2&lt;BR /&gt;OBS=11&lt;BR /&gt;ENCODING="LATIN1"&lt;BR /&gt;DLM='3b'x&lt;BR /&gt;MISSOVER&lt;BR /&gt;DSD ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;INPUT&lt;BR /&gt;LOG_ID : ?? BEST18.&lt;BR /&gt;LOG_DH_INICIO : ?? ANYDTDTM19.&lt;BR /&gt;LOG_DH_FIM : ?? ANYDTDTM19.&lt;BR /&gt;LOG_ID_PROPOSTA : ?? BEST13.&lt;/P&gt;&lt;P&gt;INFORMAT&lt;BR /&gt;LOG_ID BEST18.&lt;BR /&gt;LOG_DH_INICIO DATETIME18.&lt;BR /&gt;LOG_DH_FIM DATETIME18.&lt;BR /&gt;LOG_ID_PROPOSTA BEST13.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dataset result of this process is shown bellow, however the variables LOG_DH_INICIO and LOG_DH_FIM are in reverse comparing with the original ones.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 548px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30763i989E959ABA58ED28/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I handle with this kind of error? SAS Log doesn´t show any error over this process.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2019 21:38:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-values-is-datasets-imported-from-txt/m-p/571291#M12137</guid>
      <dc:creator>caesouza</dc:creator>
      <dc:date>2019-07-04T21:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect values is datasets imported from txt</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-values-is-datasets-imported-from-txt/m-p/571292#M12138</link>
      <description>&lt;P&gt;It is hard to tell from the photographs of the data but are those ID values more than 15 digits?&amp;nbsp; SAS cannot store more than 15 decimal digits exactly since it stores all numbers as 8 bytes floating point numbers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You probably don't want to read ID variables as numbers. I really doubt that you are planning to take the mean of them or use them in a regression.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2019 21:41:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-values-is-datasets-imported-from-txt/m-p/571292#M12138</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-04T21:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect values is datasets imported from txt</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-values-is-datasets-imported-from-txt/m-p/571293#M12139</link>
      <description>What do you mean they're in reverse? They seem to be in the same order and same values, with a truncated ID in the first pic.&lt;BR /&gt;&lt;BR /&gt;Also, you usually don't specify both format, informat and then specify those again in your INPUT statement. I would clean up the input statement to have only the list of variables.&lt;BR /&gt;&lt;BR /&gt;Also, don't use excel to look at your text file, use a text editor otherwise you don't know what Excel has done to change how the file is displayed.</description>
      <pubDate>Thu, 04 Jul 2019 21:43:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-values-is-datasets-imported-from-txt/m-p/571293#M12139</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-04T21:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect values is datasets imported from txt</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-values-is-datasets-imported-from-txt/m-p/571304#M12143</link>
      <description>&lt;P&gt;If you use one of the ANYDT.... informats to read dates that are early in the month then it must guess whether it should use MDY or DMY order.&amp;nbsp; Which one it chooses is probably determined by some type of setting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you think that 11/06 means the 11th of June instead of November 6th then you should read the date value with DDMMYY informat and then your code will not depend on who runs it (or where they live).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please show the actual lines from the text file (not a photograph of what it looks like after it has been read by a spreadsheet program) so we can see what the values actually look like. Use the Insert Code button in the editor to open a pop window that you can paste the lines into so that the spaces are not managed by the forum editor.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 03:27:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-values-is-datasets-imported-from-txt/m-p/571304#M12143</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-05T03:27:46Z</dc:date>
    </item>
  </channel>
</rss>

