LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2011, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 10 Feb 2011 20:17:23 -0600
Reply-To:     Joe Matise <snoopy369@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Joe Matise <snoopy369@GMAIL.COM>
Subject:      Re: Reading delimited data without line breaks
Comments: To: Micotine Muso <micotine@gmail.com>
In-Reply-To:  <201102110204.p1B1qGW4007879@waikiki.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1

As long as you leave the @@ pointer control marker in the input statement, SAS will continue reading the same 'line' until the end of said line and/or the end of the data. So

input institution $ city $ State $ number1 number2 @@;

will continue reading at the point it leaves off at the start of the next iteration of the data step. You could of course use one @ and manually loop through the input as well (as I likely would do).

-Joe

On Thu, Feb 10, 2011 at 8:04 PM, Micotine Muso <micotine@gmail.com> wrote:

> Dear Friends, > > I am trying to import a delimited data file (delimiter=;) but it has no > linebreaks. It has following fields per observation: > > Institution > City > State > number1 > number2 > > Could you please help me read this file into SAS. > > Thanks, > MM > ***Part of the file is included below.**** > > University of Maryland Medical System;Baltimore;MD;58;669;National Capital > Consortium;Bethesda;MD;56;668;University of Texas School of Medicine at San > Antonio;San Antonio;TX;50;666;University of North Carolina Hospitals;Chapel > Hill;NC;62;663;University of Virginia Medical > Center;Charlottesville;VA;63;659;Thomas Jefferson University > Hospital;Philadelphia;PA;56;658;University of Chicago Medical > Center;Chicago;IL 63;NY 71;644;641;Strong Memorial Hospital of the > University of Rochester;Rochester;Virginia Commonwealth University Health > System;Richmond;VA;67;639;University of Texas Medical Branch > Hospitals;Galveston;TX;54;635;University of Tennessee College of > Medicine;Memphis;TN;52;623;Oregon Health & Science University > Hospital;Portland;OR;61;619;University of Florida College of > Medicine;Gainesville;FL;58;618; >


Back to: Top of message | Previous page | Main SAS-L page