<?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 Having problem reading in a file. in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14733#M2436</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just added/edited some details to my original post, I don't know if doing so will let others know that I did so, so I'm making a post about it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 26 Feb 2012 04:00:38 GMT</pubDate>
    <dc:creator>Leon27607</dc:creator>
    <dc:date>2012-02-26T04:00:38Z</dc:date>
    <item>
      <title>Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14723#M2426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the most part I have been reading in data horizontally but I now have a data set that has data written vertically. I am having trouble reading this data correctly. This data file has 8000+ observations but I will simply list out the first few so you know what I'm talking about. &lt;/P&gt;&lt;P&gt;In the file, there are names, addresses, and telephone numbers of most of the child care centers in North Carolina (total ~ 8000).&amp;nbsp; Each center takes six records in the file.&amp;nbsp; The first record is the eight digit license number; the second record is the name; the third is the street address; the fourth record is the town, state (NC), and zip code in columns 31-35.&amp;nbsp; In the fifth record is the telephone number in the form (xxx) xxx-xxxx where the first field is the area code.&amp;nbsp; The sixth record gives what class of center (e.g. 'Five Star') and what type of license.&amp;nbsp; On this last record, we only need to read in the class, which is the first field in that record.&amp;nbsp; Most of the values of class are 'One' to 'Five' while other values include 'Temporary' and a statute designation. I need to write a SAS program to read in this information, where each center corresponds to an observation with (at least) variables for the license number, zip code, area code, and class of center (character variable).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried a good amount of things but still have not been able to get this to work correctly. I am mostly dealing with simply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data child;&lt;/P&gt;&lt;P&gt;infile 'file location' ;&lt;/P&gt;&lt;P&gt;input ______;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am allowed to use @@ or a do loop and also keep, drop commands. Some other things that may be mentioned here on the forums, I may not have learned yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;EDIT: I have now attached the file to my question. Also, if you're interested in helping me well this is actually course work for a class found at &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.stat.ncsu.edu/people/monahan/courses/st445/"&gt;http://www.stat.ncsu.edu/people/monahan/courses/st445/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;if you want to see the things we've done so I don't step out my bounds. I know that I am supposed to "Figure it out by myself" but for these kind of things I learn best by example. I did my previous homework for this class by using the examples he showed us in class. However, for this assignment (Homework 3) I have spent a few hours on it but still cannot figure it out. I would appreciate it if someone could at least get me started, I understand that inputting the file is the hardest part. I can probably do the other parts by myself just fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 00:05:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14723#M2426</guid>
      <dc:creator>Leon27607</dc:creator>
      <dc:date>2012-02-26T00:05:13Z</dc:date>
    </item>
    <item>
      <title>Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14724#M2427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Below link should answer your question:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/viewer.htm#a002001051.htm"&gt;http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/viewer.htm#a002001051.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 00:39:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14724#M2427</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-02-26T00:39:09Z</dc:date>
    </item>
    <item>
      <title>Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14725#M2428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you really have exactly 6 records per file, and each captures the same fields, you could use something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat stuff $80.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input stuff &amp;amp;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;68000482&lt;/P&gt;&lt;P&gt;CHILDREN'S CAMPUS OF CHAPEL HILL II&lt;/P&gt;&lt;P&gt;1620 MLK JR BLVD&lt;/P&gt;&lt;P&gt;CHAPEL HILL, NC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 27514&lt;/P&gt;&lt;P&gt;(919) 967-5020&lt;/P&gt;&lt;P&gt;Temporary License&lt;/P&gt;&lt;P&gt;92002687&lt;/P&gt;&lt;P&gt;"HAPPY FACES" CHILD CARE CENTER&lt;/P&gt;&lt;P&gt;4500 EMMIT DRIVE&lt;/P&gt;&lt;P&gt;RALEIGH, NC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 27604&lt;/P&gt;&lt;P&gt;(919) 231-0783&lt;/P&gt;&lt;P&gt;One Star Family CC Home License&lt;/P&gt;&lt;P&gt;60002518&lt;/P&gt;&lt;P&gt;'A' IS FOR APPLE&lt;/P&gt;&lt;P&gt;11919 PLANTERS ESTATES DRIVE&lt;/P&gt;&lt;P&gt;CHARLOTTE, NC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 28278&lt;/P&gt;&lt;P&gt;(704) 504-8977&lt;/P&gt;&lt;P&gt;Five Star Center License&lt;/P&gt;&lt;P&gt;32001484&lt;/P&gt;&lt;P&gt;'A' PRECIOUS ANGEL DAYCARE&lt;/P&gt;&lt;P&gt;916 SOUTH MINERAL SPRINGS ROAD&lt;/P&gt;&lt;P&gt;DURHAM, NC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 27703&lt;/P&gt;&lt;P&gt;(919) 957-8496&lt;/P&gt;&lt;P&gt;Three Star Family CC Home License&lt;/P&gt;&lt;P&gt;64000406&lt;/P&gt;&lt;P&gt;'AGAPE' CENTER OF LOVE'&lt;/P&gt;&lt;P&gt;203 N WALNUT STREET&lt;/P&gt;&lt;P&gt;SPRING HOPE, NC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 27882&lt;/P&gt;&lt;P&gt;(252) 885-6249&lt;/P&gt;&lt;P&gt;GS 110-106&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want (drop=stuff);&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain id org add: phone;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if mod(_n_,6) eq 1 then id=strip(stuff);&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if mod(_n_,6) eq 2 then org=strip(stuff);&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if mod(_n_,6) eq 3 then address1=strip(stuff);&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if mod(_n_,6) eq 4 then address2=strip(stuff);&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if mod(_n_,6) eq 5 then phone=strip(stuff);&lt;/P&gt;&lt;P&gt;&amp;nbsp; else do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; license=stuff;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 00:46:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14725#M2428</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-26T00:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14726#M2429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Start simple.&amp;nbsp; Read the 6 lines into 6 character variables so that you can make sure the format is consistent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; infile 'myfile' truncover ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input #1 line1 $200. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #2 line2 $200.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #3 line3 $200.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #4 line4 $200.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #5 line5 $200.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #6 line6 $200.&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 01:19:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14726#M2429</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-02-26T01:19:31Z</dc:date>
    </item>
    <item>
      <title>Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14727#M2430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well it's not exactly like that, It's one big file with 8000+ records. I just gave an example of what the file looks like. It's data in that format all the way down with a total of ~8000 "observations"(this is with all the 6 variables). I also have to somehow split the zip from the city and state, and split the area code from the phone number. I have to use an infile statement instead of cards because of such a huge data file. I don't believe I've learned what "informat" does and also what the &amp;amp; does in the input statement. I've done mostly either character variables(denoted by $) or numeric(no format or the default). But the code at the bottom does seem helpful and I think I might have to do something along those lines. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 01:23:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14727#M2430</guid>
      <dc:creator>Leon27607</dc:creator>
      <dc:date>2012-02-26T01:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14728#M2431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your entire file is as clean as your example data, then you might be able to get away with code as simple as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat id $10.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat org address1 citystate $60.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat areacode $3.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat phone $10.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat license $50.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile "c:\art\havedata.txt";&lt;/P&gt;&lt;P&gt;&amp;nbsp; input id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /org &amp;amp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /address1 &amp;amp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /citystate &amp;amp; zipcode&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / @2 areacode&amp;nbsp; @7 phone &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /license;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 02:18:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14728#M2431</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-26T02:18:21Z</dc:date>
    </item>
    <item>
      <title>Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14729#M2432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just tried doing multiple input statements but my log still gives me errors. I tried this just to see what would happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data child;&lt;/P&gt;&lt;P&gt;infile 'E:\School Stuff\ST445\child4.txt' obs=2 pad;&lt;/P&gt;&lt;P&gt;input centerid;&lt;/P&gt;&lt;P&gt;input name $ 1-36;&lt;/P&gt;&lt;P&gt;input address $ 1-36;&lt;/P&gt;&lt;P&gt;input townstatezip $ 1-36 ;&lt;/P&gt;&lt;P&gt;input phone $ 1-36 ;&lt;/P&gt;&lt;P&gt;input class $ 1-36; &lt;/P&gt;&lt;P&gt;put _all_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also the log will tell me that I have a "Lost card" what does this mean exactly? Log: "&lt;/P&gt;&lt;P&gt;NOTE: LOST CARD.&lt;/P&gt;&lt;P&gt;centerid=68000482 name=CHILDREN'S CAMPUS OF CHAPEL HILL II address=&amp;nbsp; townstatezip=&amp;nbsp; phone=&amp;nbsp; class=&lt;/P&gt;&lt;P&gt;_ERROR_=1 _N_=1&lt;/P&gt;&lt;P&gt;NOTE: 2 records were read from the infile 'E:\School Stuff\ST445\child4.txt'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The minimum record length was 8.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The maximum record length was 35."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 03:31:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14729#M2432</guid>
      <dc:creator>Leon27607</dc:creator>
      <dc:date>2012-02-26T03:31:47Z</dc:date>
    </item>
    <item>
      <title>Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14730#M2433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Start with Tom's suggestion below and build from there. Its the wise thing to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 03:42:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14730#M2433</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-02-26T03:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14731#M2434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I disagree.&amp;nbsp; If his data are as clean as his example, the code I suggested witl do everything he needs in one pass:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; font-family: Arial, Helvetica, sans-serif;"&gt;data want;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp; informat id $10.;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp; informat org address1 citystate $60.;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp; informat areacode $3.;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp; informat phone $10.;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp; informat license $50.;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp; infile "c:\art\havedata.txt";&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp; input id&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /org &amp;amp;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /address1 &amp;amp;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /citystate &amp;amp; zipcode&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / @2 areacode&amp;nbsp; @7 phone&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /license;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; font-family: Arial, Helvetica, sans-serif;"&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 03:44:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14731#M2434</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-26T03:44:13Z</dc:date>
    </item>
    <item>
      <title>Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14732#M2435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We haven't done anything with "informat" yet so I don't think we can use that, also we can't use formatting with the "/" command. By the way I tested your code to see if it would work but it still doesn't. I can attach the actual file to my original post if that would help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 03:49:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14732#M2435</guid>
      <dc:creator>Leon27607</dc:creator>
      <dc:date>2012-02-26T03:49:45Z</dc:date>
    </item>
    <item>
      <title>Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14733#M2436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just added/edited some details to my original post, I don't know if doing so will let others know that I did so, so I'm making a post about it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 04:00:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14733#M2436</guid>
      <dc:creator>Leon27607</dc:creator>
      <dc:date>2012-02-26T04:00:38Z</dc:date>
    </item>
    <item>
      <title>Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14734#M2437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using #1 etc., like Tom suggested, is the same thing as using / to change records.&amp;nbsp; Formally defining informats with informat statements is the same thing as putting them on the input line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the following.&amp;nbsp; I believe it covers all of your exceptions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile "c:\art\child4.txt" truncover;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input #1 id $10.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #2 org &amp;amp; : $60.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #3 address1 &amp;amp; : $60.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #4 citystate &amp;amp; : $60. zipcode $10.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #5 @2 areacode $3. @7 phone $8. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #6 license &amp;amp; : $50.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 04:15:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14734#M2437</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-26T04:15:08Z</dc:date>
    </item>
    <item>
      <title>Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14735#M2438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code you've previously posted would have worked. &lt;/P&gt;&lt;P&gt;The issue you had there was "obs=2" in the infile statement but at the same time 6 input statements (=trying to read 6 lines in one iteration of the datastep). That's where the "lostcard" came from.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below code will run. I prefer "truncover" over "pad" - but both is o.k. in your case. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; data want;&lt;BR /&gt;/*&amp;nbsp; infile 'C:\temp\child4.txt' truncover lrecl=100;*/&lt;BR /&gt;&amp;nbsp; infile 'C:\temp\child4.txt' /*obs=6*/ pad;&lt;BR /&gt;&amp;nbsp; input centerid 15.;&lt;BR /&gt;&amp;nbsp; input name $ 1-36;&lt;BR /&gt;&amp;nbsp; input address $ 1-36;&lt;BR /&gt;&amp;nbsp; input townstatezip $ 1-36 ;&lt;BR /&gt;&amp;nbsp; input phone $ 1-36 ;&lt;BR /&gt;&amp;nbsp; input class $ 1-36; &lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print data=want;&lt;BR /&gt;run;&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;&lt;P&gt;﻿data want;&lt;BR /&gt;/*&amp;nbsp; infile 'C:\temp\child4.txt' truncover lrecl=100;*/&lt;BR /&gt;&amp;nbsp; infile 'C:\temp\child4.txt' /*obs=6*/ pad;&lt;BR /&gt;&amp;nbsp; input centerid 15.;&lt;BR /&gt;&amp;nbsp; input name $ 1-36;&lt;BR /&gt;&amp;nbsp; input address $ 1-36;&lt;BR /&gt;&amp;nbsp; input townstatezip $ 1-36 ;&lt;BR /&gt;&amp;nbsp; input phone $ 1-36 ;&lt;BR /&gt;&amp;nbsp; input class $ 1-36; &lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=want;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 04:30:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14735#M2438</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-02-26T04:30:40Z</dc:date>
    </item>
    <item>
      <title>Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14736#M2439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well this "works" but it uses things we haven't learned so I'm pretty sure the teacher would be suspicious about what I did lol...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 04:39:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14736#M2439</guid>
      <dc:creator>Leon27607</dc:creator>
      <dc:date>2012-02-26T04:39:10Z</dc:date>
    </item>
    <item>
      <title>Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14737#M2440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, now I just have to figure out how to get the 4 he really wants, I know I need to use "drop" for some but I still have to somehow seperate the zip code from the city, state and the area code from the full phone number.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 04:41:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14737#M2440</guid>
      <dc:creator>Leon27607</dc:creator>
      <dc:date>2012-02-26T04:41:32Z</dc:date>
    </item>
    <item>
      <title>Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14738#M2441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at your data.&amp;nbsp; Every field is in certain columns.&amp;nbsp; I'll leave the rest for you to figure out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 04:43:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14738#M2441</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-26T04:43:55Z</dc:date>
    </item>
    <item>
      <title>Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14739#M2442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the syntax that I am supposed to use if I want to "call" the columns that I need. I know I would have to probably make a zip and areacode variable but how can I make it so that it's like zip = townstatezip's column 31-36?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 19:53:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14739#M2442</guid>
      <dc:creator>Leon27607</dc:creator>
      <dc:date>2012-02-26T19:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14740#M2443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pretty much the same as others provided:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data foo;&lt;/P&gt;&lt;P&gt; infile cards truncover dlm=', ()';&lt;/P&gt;&lt;P&gt; input #1 id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #2 company_name $36.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #3 street $36.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #4 city &amp;amp; :$26. state :$10. zip :$5.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #5 arecode :$3. phone :$36.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #6 policy $36.;&lt;/P&gt;&lt;P&gt; cards;&lt;/P&gt;&lt;P&gt;68000482&lt;/P&gt;&lt;P&gt;CHILDREN'S CAMPUS OF CHAPEL HILL II&lt;/P&gt;&lt;P&gt;1620 MLK JR BLVD&lt;/P&gt;&lt;P&gt;CHAPEL HILL, NC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 27514&lt;/P&gt;&lt;P&gt;(919) 967-5020&lt;/P&gt;&lt;P&gt;Temporary License&lt;/P&gt;&lt;P&gt;92002687&lt;/P&gt;&lt;P&gt;"HAPPY FACES" CHILD CARE CENTER&lt;/P&gt;&lt;P&gt;4500 EMMIT DRIVE&lt;/P&gt;&lt;P&gt;RALEIGH, NC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 27604&lt;/P&gt;&lt;P&gt;(919) 231-0783&lt;/P&gt;&lt;P&gt;One Star Family CC Home License&lt;/P&gt;&lt;P&gt;60002518&lt;/P&gt;&lt;P&gt;'A' IS FOR APPLE&lt;/P&gt;&lt;P&gt;11919 PLANTERS ESTATES DRIVE&lt;/P&gt;&lt;P&gt;CHARLOTTE, NC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 28278&lt;/P&gt;&lt;P&gt;(704) 504-8977&lt;/P&gt;&lt;P&gt;Five Star Center License&lt;/P&gt;&lt;P&gt;32001484&lt;/P&gt;&lt;P&gt;'A' PRECIOUS ANGEL DAYCARE&lt;/P&gt;&lt;P&gt;916 SOUTH MINERAL SPRINGS ROAD&lt;/P&gt;&lt;P&gt;DURHAM, NC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 27703&lt;/P&gt;&lt;P&gt;(919) 957-8496&lt;/P&gt;&lt;P&gt;Three Star Family CC Home License&lt;/P&gt;&lt;P&gt;64000406&lt;/P&gt;&lt;P&gt;'AGAPE' CENTER OF LOVE'&lt;/P&gt;&lt;P&gt;203 N WALNUT STREET&lt;/P&gt;&lt;P&gt;SPRING HOPE, NC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 27882&lt;/P&gt;&lt;P&gt;(252) 885-6249&lt;/P&gt;&lt;P&gt;GS 110-106&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P align="center"&gt;&lt;/P&gt;&lt;TABLE cellspacing="0" class="Table"&gt;&lt;THEAD&gt;&lt;TR&gt;&lt;TH class="Header" scope="colgroup" style="vertical-align: middle; text-align: right;"&gt;Obs&lt;/TH&gt;&lt;TH class="Header" scope="colgroup" style="vertical-align: middle; text-align: right;"&gt;id&lt;/TH&gt;&lt;TH class="Header" scope="colgroup" style="vertical-align: middle; text-align: left;"&gt;company_name&lt;/TH&gt;&lt;TH class="Header" scope="colgroup" style="vertical-align: middle; text-align: left;"&gt;street&lt;/TH&gt;&lt;TH class="Header" scope="colgroup" style="vertical-align: middle; text-align: left;"&gt;city&lt;/TH&gt;&lt;TH class="Header" scope="colgroup" style="vertical-align: middle; text-align: left;"&gt;state&lt;/TH&gt;&lt;TH class="Header" scope="colgroup" style="vertical-align: middle; text-align: left;"&gt;zip&lt;/TH&gt;&lt;TH class="Header" scope="colgroup" style="vertical-align: middle; text-align: left;"&gt;arecode&lt;/TH&gt;&lt;TH class="Header" scope="colgroup" style="vertical-align: middle; text-align: left;"&gt;phone&lt;/TH&gt;&lt;TH class="Header" scope="colgroup" style="vertical-align: middle; text-align: left;"&gt;policy&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="RowHeader" nowrap="nowrap" style="text-align: right;"&gt;1&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: right;"&gt;68000482&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;CHILDREN'S CAMPUS OF CHAPEL HILL II&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;1620 MLK JR BLVD&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;CHAPEL HILL&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;NC&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;27514&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;919&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;967-5020&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;Temporary License&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="RowHeader" nowrap="nowrap" style="text-align: right;"&gt;2&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: right;"&gt;92002687&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;"HAPPY FACES" CHILD CARE CENTER&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;4500 EMMIT DRIVE&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;RALEIGH&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;NC&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;27604&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;919&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;231-0783&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;One Star Family CC Home License&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="RowHeader" nowrap="nowrap" style="text-align: right;"&gt;3&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: right;"&gt;60002518&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;'A' IS FOR APPLE&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;11919 PLANTERS ESTATES DRIVE&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;CHARLOTTE&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;NC&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;28278&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;704&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;504-8977&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;Five Star Center License&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="RowHeader" nowrap="nowrap" style="text-align: right;"&gt;4&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: right;"&gt;32001484&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;'A' PRECIOUS ANGEL DAYCARE&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;916 SOUTH MINERAL SPRINGS ROAD&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;DURHAM&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;NC&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;27703&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;919&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;957-8496&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;Three Star Family CC Home License&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="RowHeader" nowrap="nowrap" style="text-align: right;"&gt;5&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: right;"&gt;64000406&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;'AGAPE' CENTER OF LOVE'&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;203 N WALNUT STREET&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;SPRING HOPE&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;NC&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;27882&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;252&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;885-6249&lt;/TD&gt;&lt;TD class="Data" nowrap="nowrap" style="text-align: left;"&gt;GS 110-106&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Matthew Kastin&#xD;
&#xD;
I noticed you wanted to separate area code and phone number too.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 21:24:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14740#M2443</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2012-02-26T21:24:56Z</dc:date>
    </item>
    <item>
      <title>Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14741#M2444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is called column mode input.&amp;nbsp; Here is the link to the Help page for it.&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000148066.htm"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000148066.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You should read the other pages on the other ways that the INPUT statement can be used.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 21:42:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14741#M2444</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-02-26T21:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: Having problem reading in a file.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14742#M2445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not exactly what I was asking. I was asking is it possible to only keep my original 6 variables but somehow create a new variable(without an input statement) that would only use parts of the previously created variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this so far but there's parts of it that needs to be changed because it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data child;&lt;/P&gt;&lt;P&gt;infile 'E:\School Stuff\ST445\child4.txt' pad; *Reading the file in and padding the end with spaces so it can tell when a new record begins*/;&lt;/P&gt;&lt;P&gt;input centerid; *Inputting every variable in one by one because they are given vertically*/;&lt;/P&gt;&lt;P&gt;input name $ 1-36;&lt;/P&gt;&lt;P&gt;input address $ 1-36;&lt;/P&gt;&lt;P&gt;input townstatezip $ 1-36 ;&lt;/P&gt;&lt;P&gt;input aphone $ 1-36 ;&lt;/P&gt;&lt;P&gt;input class $ 1-36; &lt;/P&gt;&lt;P&gt;stars = .;&lt;/P&gt;&lt;P&gt;if (class&amp;nbsp; = 'One') then stars = 1;&lt;/P&gt;&lt;P&gt;else if (class = 'Two') then stars = 2;&lt;/P&gt;&lt;P&gt;else if (class = 'Three') then stars = 3;&lt;/P&gt;&lt;P&gt;else if (class = 'Four') then stars = 4;&lt;/P&gt;&lt;P&gt;else if (class = 'Five') then stars = 5;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (areacode != 828 or 704 or 980 or 336 or 919 or 910 or 252) then put 'Error';&lt;/P&gt;&lt;P&gt;run; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my assignment I have to change the "Class" to a variable and one, two, three, four, five obviously have different lengths for different records. I understand that if I read that line as 2 variables I could just use free format but like I said I was wondering if I could create a new variable without having to use "input."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Feb 2012 22:01:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Having-problem-reading-in-a-file/m-p/14742#M2445</guid>
      <dc:creator>Leon27607</dc:creator>
      <dc:date>2012-02-26T22:01:31Z</dc:date>
    </item>
  </channel>
</rss>

