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 (June 2008, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 11 Jun 2008 12:58:21 -0700
Reply-To:   Peter <crawfordsoftware@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Peter <crawfordsoftware@GMAIL.COM>
Organization:   http://groups.google.com
Subject:   Re: reading variables enclosed in quotes
Comments:   To: sas-l@uga.edu
Content-Type:   text/plain; charset=ISO-8859-1

On Jun 11, 3:45 pm, datan...@GMAIL.COM ("data _null_,") wrote: > as long as you have at least 2 spaces between each quoted field the & > format modifier is the solution you need. > > data x; > infile datalines firstobs=2; > input (name temp state) (&$quote.); > age = input(temp,best.); > drop temp; > datalines; > "Name" "Age" "State" > "Smith AA" "22" "NJ" > "Tom BB" "44" "CT" > "Shake CC" "34" "CA" > ; > run; > proc print; > run; > > On 6/11/08, rmat <reg...@gmail.com> wrote: > > > > > Hi Mike, > > > Thanks very much for your solution. However, I am facing another issue > > as there are space within enclosed quotes (like below). It will be > > great if you or anybody else can help me regarding this. > > > Thanks again, Regi > > > data x; > > infile datalines firstobs=2; > > input (name temp state) (: $quote.); > > age = input(temp,best.); > > drop temp; > > datalines; > > "Name" "Age" "State" > > "Smith AA" "22" "NJ" > > "Tom BB" "44" "CT" > > "Shake CC" "34" "CA" > > ; > > run;- Hide quoted text - > > - Show quoted text -

I'm a bit worried about Mike's experience. DSD option is implemented to support quoted fields. For example embedded delimiters and/or comma formatted amounts would be quoted and imported successfully by most import routines, and I first tested and found that working in an early SAS6 release. However, I ever checked it with this exact combination: quoted short simple numeric with DLM=' ' ...... hmmmm


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