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 (December 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 23 Dec 2009 11:10:40 -0800
Reply-To:   Tom Abernathy <tom.abernathy@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Tom Abernathy <tom.abernathy@GMAIL.COM>
Organization:   http://groups.google.com
Subject:   Re: How can I get datalines and _infile_ to read blank lines
Comments:   To: sas-l@uga.edu
Content-Type:   text/plain; charset=ISO-8859-1

You must be having some type of editor problems. Actually when I copied your code from the email I got 10 lines. Each of your blank lines pasted as two blank lines. That code should treat lines with 0,1, or 100 blanks any differently. What Operating System are you using? Are you running interactively or submitting a backgroup SAS job?

On Dec 23, 12:46 pm, xlr82sas <xlr82...@aol.com> wrote: > Hi SAS-Lers, > > I need to create a tst dataset with 7 observations not 4. How do I > create 7 obs with lyn having values 1-4 and 3 values of ' '. I hope > this is message readable. The inline data is 7 records 1,' ',2,' ',3,' > ' and 4. Infile seems to ignore blank lines and I need infile to honor > blank lines. > > data tst; > length lyn $80; > input; > put _infile_ $hex2.; > lyn=_infile_; > datalines; > 1 > > 2 > > 3 > > 4 > ;;;; > run; > > 31147 data tst; > 31148 length lyn $80; > 31149 input; > 31150 put _infile_ $hex2.; > 31151 lyn=_infile_; > 31152 datalines; > > 31 > 32 > 33 > 34 > NOTE: The data set WORK.TST has 4 observations and 1 variables. > NOTE: DATA statement used (Total process time): > real time 0:00.00 > cpu time 0:00.01 > > The hidden dragon works, but I don't want to have the dragon in my > dataset. > > data tst; > length lyn $80; > input; > put _infile_ $hex2.; > lyn=_infile_; > datalines; > 1 > > 2 > > 3 > > 4 > ;;;; > run; > > 31159 data tst; > 31160 length lyn $80; > 31161 input; > 31162 put _infile_ $hex2.; > 31163 lyn=_infile_; > 31164 datalines; > > 31 > A0 > 32 > A0 > 33 > A0 > 34 > NOTE: The data set WORK.TST has 7 observations and 1 variables. > NOTE: DATA statement used (Total process time): > real time 0:00.00 > cpu time 0:00.01


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