<?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: read in data but datum makes problem in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/read-in-data-but-datum-makes-problem/m-p/438036#M282305</link>
    <description>&lt;P&gt;Show the log from when you run that data step.&lt;/P&gt;
&lt;P&gt;The code you show cannot generate the output shown as&lt;/P&gt;
&lt;PRE&gt;data want;
infile 'have';
dsd missover delimiter = ';';
input
id
animal id   &amp;lt;= This ID would read the third column into the variable ID 
datum_1 DDMMYY8.
Diagnose_1
Diagnose_2 
Diagnose_3
datum_2 DDMMYY8. ;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your informat is incorrect for datum1 and datum2, you want ddmmyy10. (count the number of characters)&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;Also since your code shows a delimiter of ; it may help to post a few rows of data into a code box as your example input does not match your code either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best practice is to paste the data and&amp;nbsp;log into a&amp;nbsp;code box opened using the forum's {I} icon to preserve any messages or error text formatting.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Feb 2018 18:08:05 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-02-16T18:08:05Z</dc:date>
    <item>
      <title>read in data but datum makes problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-in-data-but-datum-makes-problem/m-p/437924#M282304</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have following data to read into SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ID      animal ID       datum1     diagnose1 diagnose2 diagnose3 datum2&lt;BR /&gt;34204	1002031979	30.01.2017	2	4	3	.
33107	1001106236	16.01.2013	2	4	3	.
33107	1001655944	29.03.2013	1	13	.	.
33107	1001706748	05.04.2013	1	13	.	.
33107	1001555944	23.05.2013	1	13	.	.
33107	1001886460	13.06.2013	1	13	.	.
33107	1001607961	02.07.2013	1	13	.	04.02.2016
33107	1001531694	05.10.2013	1	13	.	.
33107	1000886460	30.04.2014	1	13	.	.
33107	1001555906	30.04.2014	1	13	.	.&lt;/PRE&gt;&lt;P&gt;I have IDs and animal IDs. For ever animal I have datums where the animal was treated by the vet and the diagnose1,2,3 tells me what kind of disease that animal had.&lt;/P&gt;&lt;P&gt;Now I want to read it into SAS. But the problem is the datum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here how it looks when I read it into SAS:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ID      animal ID      datum1 diagnose1 diagnose2 diagnose3 datum2
34204	1002031979      20849	.	2	.	    .
33107	1001106236	19374   .	2	.	    .
33107	1001655944	19446	.	1	.	    .
33107	1001706748	19453	.	1	.	    .
33107	1001555944	19501	.	1	.	    .
33107	1001886460	19522	.	1	.	    .
33107	1001607961	19541	.	1	13	    .
33107	1001531694	19636	.	1	.	    .
33107	1000886460	19843	.	1	.	    .
33107	1001555906	19843	.	1	.	    .&lt;/PRE&gt;&lt;P&gt;That the datum is now a number so SAS can work/count with it is ok but next column should be like the table above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My SAS Code is this&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
infile 'have';
dsd missover delimiter = ';';
input
id
animal id 
datum_1 DDMMYY8.
Diagnose_1
Diagnose_2 
Diagnose_3
datum_2 DDMMYY8. ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Can anyone imagine what the problem could be?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 10:07:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-in-data-but-datum-makes-problem/m-p/437924#M282304</guid>
      <dc:creator>duel</dc:creator>
      <dc:date>2018-02-16T10:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: read in data but datum makes problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-in-data-but-datum-makes-problem/m-p/438036#M282305</link>
      <description>&lt;P&gt;Show the log from when you run that data step.&lt;/P&gt;
&lt;P&gt;The code you show cannot generate the output shown as&lt;/P&gt;
&lt;PRE&gt;data want;
infile 'have';
dsd missover delimiter = ';';
input
id
animal id   &amp;lt;= This ID would read the third column into the variable ID 
datum_1 DDMMYY8.
Diagnose_1
Diagnose_2 
Diagnose_3
datum_2 DDMMYY8. ;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your informat is incorrect for datum1 and datum2, you want ddmmyy10. (count the number of characters)&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;Also since your code shows a delimiter of ; it may help to post a few rows of data into a code box as your example input does not match your code either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best practice is to paste the data and&amp;nbsp;log into a&amp;nbsp;code box opened using the forum's {I} icon to preserve any messages or error text formatting.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 18:08:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-in-data-but-datum-makes-problem/m-p/438036#M282305</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-02-16T18:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: read in data but datum makes problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-in-data-but-datum-makes-problem/m-p/438040#M282306</link>
      <description>&lt;P&gt;Looks like you forgot to attach a format to your date variables. So SAS is displaying the internal representation of the dates, which is number of days since 01JAN1960.&amp;nbsp; Just add a FORMAT statement to your data step.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 19:43:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-in-data-but-datum-makes-problem/m-p/438040#M282306</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-02-16T19:43:54Z</dc:date>
    </item>
  </channel>
</rss>

