<?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 date format problem error 48-59 in SAS Health and Life Sciences</title>
    <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/date-format-problem-error-48-59/m-p/6424#M625</link>
    <description>How can i fix this problem ?&lt;BR /&gt;
data infile a.txt&lt;BR /&gt;
AAA,13000,14/5/1978,32,MR,1,6,A&lt;BR /&gt;
BBB,30000,25/7/1955,52,MR,1,12,B&lt;BR /&gt;
CCC,12000,3/5/1978,29,MRS,0,12,C&lt;BR /&gt;
&lt;BR /&gt;
data f11;&lt;BR /&gt;
length d1 $10.;&lt;BR /&gt;
infile "d:\DATA\a.txt" dlm =',' ;&lt;BR /&gt;
input status $ salary d1 ddmmyy10. age title $ gender duration mar $    ;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ERROR 48-59: The format $MMDDYY was not found or could not be loaded&lt;BR /&gt;
&lt;BR /&gt;
thanks in advance.</description>
    <pubDate>Sat, 19 Jan 2008 03:03:50 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-01-19T03:03:50Z</dc:date>
    <item>
      <title>date format problem error 48-59</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/date-format-problem-error-48-59/m-p/6424#M625</link>
      <description>How can i fix this problem ?&lt;BR /&gt;
data infile a.txt&lt;BR /&gt;
AAA,13000,14/5/1978,32,MR,1,6,A&lt;BR /&gt;
BBB,30000,25/7/1955,52,MR,1,12,B&lt;BR /&gt;
CCC,12000,3/5/1978,29,MRS,0,12,C&lt;BR /&gt;
&lt;BR /&gt;
data f11;&lt;BR /&gt;
length d1 $10.;&lt;BR /&gt;
infile "d:\DATA\a.txt" dlm =',' ;&lt;BR /&gt;
input status $ salary d1 ddmmyy10. age title $ gender duration mar $    ;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ERROR 48-59: The format $MMDDYY was not found or could not be loaded&lt;BR /&gt;
&lt;BR /&gt;
thanks in advance.</description>
      <pubDate>Sat, 19 Jan 2008 03:03:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/date-format-problem-error-48-59/m-p/6424#M625</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-01-19T03:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: date format problem error 48-59</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/date-format-problem-error-48-59/m-p/6425#M626</link>
      <description>Hi Photo.&lt;BR /&gt;
First you have to drop the LENGTH statement : it's telling SAS that the D1 variable is character type -- which obviously it is not, since it's a date. If you want the dates stored as character (preventing the use of SAS date functions), see point 3.&lt;BR /&gt;
Second you have to add : before the DDMMYY informat in the INPUT statement, since the total length of the dates is not always the same (from 8 to 10). The 10 figure at the end of the informat will then be considered as the maximum length of data to read before delimiter.&lt;BR /&gt;
Third, if you want to get D1 as a character variable, replace the :DDMMYY10. informat for D1 for :$10. and you don't even need the LENGTH statement anyway.&lt;BR /&gt;
That would lead to : [pre]&lt;BR /&gt;
&lt;BR /&gt;
data f11;&lt;BR /&gt;
  infile cards dlm =',' ;&lt;BR /&gt;
  input status $ salary d1 :ddmmyy10. age title $ gender duration mar $ ;&lt;BR /&gt;
  format d1 ddmmyy10. ;&lt;BR /&gt;
cards ;&lt;BR /&gt;
AAA,13000,14/5/1978,32,MR,1,6,A&lt;BR /&gt;
BBB,30000,25/7/1955,52,MR,1,12,B&lt;BR /&gt;
CCC,12000,3/5/1978,29,MRS,0,12,C&lt;BR /&gt;
;&lt;BR /&gt;
run;[/pre]&lt;BR /&gt;
or&lt;BR /&gt;
[pre]&lt;BR /&gt;
data f11;&lt;BR /&gt;
infile cards dlm =',' ;&lt;BR /&gt;
input status $ salary d1 :$10. age title $ gender duration mar $ ;&lt;BR /&gt;
cards ;&lt;BR /&gt;
AAA,13000,14/5/1978,32,MR,1,6,A&lt;BR /&gt;
BBB,30000,25/7/1955,52,MR,1,12,B&lt;BR /&gt;
CCC,12000,3/5/1978,29,MRS,0,12,C&lt;BR /&gt;
;&lt;BR /&gt;
run;[/pre]&lt;BR /&gt;
Regards,&lt;BR /&gt;
Olivier</description>
      <pubDate>Sat, 19 Jan 2008 10:21:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/date-format-problem-error-48-59/m-p/6425#M626</guid>
      <dc:creator>Olivier</dc:creator>
      <dc:date>2008-01-19T10:21:35Z</dc:date>
    </item>
  </channel>
</rss>

