<?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: Import Function Format in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Import-Function-Format/m-p/24761#M5589</link>
    <description>Just curious how you expect to interpret the string "112001" - is it 1/1/2001 or 11/20/01?&lt;BR /&gt;
&lt;BR /&gt;
You will likely need to read-up the data into a SAS character type variable, scrub it -- split into individual month, day, year components and then use MDY function in an assignment statement.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Thu, 28 Oct 2010 17:48:26 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2010-10-28T17:48:26Z</dc:date>
    <item>
      <title>Import Function Format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-Function-Format/m-p/24760#M5588</link>
      <description>I have data with date of births that I am trying to import. Below is the code to import the date:&lt;BR /&gt;
&lt;BR /&gt;
DATA BIRTHNEW;&lt;BR /&gt;
INFILE B4 END=EOF7 LRECL=1000;&lt;BR /&gt;
IF EOF7 THEN INFILE B5 END=EOF8 LRECL=1000;&lt;BR /&gt;
IF EOF8 THEN INFILE B6 END=EOF9 LRECL=1000;&lt;BR /&gt;
IF EOF9 THEN INFILE B7 END=EOF10 LRECL=1000;&lt;BR /&gt;
IF EOF10 THEN INFILE B8 END=EOF11 LRECL=1000;&lt;BR /&gt;
IF EOF11 THEN INFILE B9 END=EOF12 LRECL=1000; &lt;BR /&gt;
&lt;BR /&gt;
INPUT CHILDDOB 55-62 HOSPITAL 73-76 MOMDOB 124-131;&lt;BR /&gt;
&lt;BR /&gt;
This obviously imports it as a numeric variable, but I have tried:&lt;BR /&gt;
&lt;BR /&gt;
INPUT CHILDDOB 55-62 Date8. HOSPITAL 73-76 MOMDOB 124-131 Date8.;&lt;BR /&gt;
&lt;BR /&gt;
But they do not import into my dataset correctly. I have also tried just leaving the import as just a numeric variable and then changing the format from the ViewTable screen by double-clicking on the variable name and changing the Column Attributes, but I come across the problem that there are not leading zeros in my source data&lt;BR /&gt;
6032004&lt;BR /&gt;
2072005&lt;BR /&gt;
11072007&lt;BR /&gt;
so all of the dates are not of the same length.  I'm trying to put into any date format so I can compare.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your help!</description>
      <pubDate>Thu, 28 Oct 2010 17:30:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-Function-Format/m-p/24760#M5588</guid>
      <dc:creator>MichaelM</dc:creator>
      <dc:date>2010-10-28T17:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Import Function Format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-Function-Format/m-p/24761#M5589</link>
      <description>Just curious how you expect to interpret the string "112001" - is it 1/1/2001 or 11/20/01?&lt;BR /&gt;
&lt;BR /&gt;
You will likely need to read-up the data into a SAS character type variable, scrub it -- split into individual month, day, year components and then use MDY function in an assignment statement.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 28 Oct 2010 17:48:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-Function-Format/m-p/24761#M5589</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-10-28T17:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Import Function Format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-Function-Format/m-p/24762#M5590</link>
      <description>From looking at the data, I would assume (not the best idea) that 112001 is 1/1/2001 as all of the years are 4 digits long.  Thanks for the advice, I'll give it a try.</description>
      <pubDate>Thu, 28 Oct 2010 17:50:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-Function-Format/m-p/24762#M5590</guid>
      <dc:creator>MichaelM</dc:creator>
      <dc:date>2010-10-28T17:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Import Function Format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-Function-Format/m-p/24763#M5591</link>
      <description>Hi:&lt;BR /&gt;
  As Scott pointed out, there's no need to post in multiple forums. I responded with an example here:&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?threadID=11696&amp;amp;tstart=0" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?threadID=11696&amp;amp;tstart=0&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 28 Oct 2010 17:55:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-Function-Format/m-p/24763#M5591</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-10-28T17:55:45Z</dc:date>
    </item>
  </channel>
</rss>

