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 (March 2011, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 5 Mar 2011 13:37:37 -0500
Reply-To:     Arthur Tabachneck <art297@ROGERS.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Arthur Tabachneck <art297@ROGERS.COM>
Subject:      Re: how to treat consecutive delimiters as one when importing txt
              files
Comments: To: Nuria Chapinal <nchapinal@YAHOO.COM>

Nuria,

Ignoring multiple delimiters also implies that you don't have any missing values. If you don't have any missing values, then you could probably do what you want by including code to change the tabs into blanks and then use the & modifier.

Art -------- On Sat, 5 Mar 2011 13:17:35 -0500, Nuria Chapinal <nchapinal@YAHOO.COM> wrote:

>On Tue, 1 Mar 2011 11:54:33 -0500, Nuria Chapinal <nchapinal@YAHOO.COM> >wrote: > >>Thanks a lot for all your help. >> >>This is one of the codes for one of the batches: >> >> >>filename FT46F001 'C:\Users\nuria\Desktop\am\fc\*.txt' lrecl=256; >>data fresh; >> length fname $256; >> infile FT46F001 dsd dlm='09'x eov=eov filename=fname noexpandtabs >missover; >> input @; >> if _n_ eq 1 or eov then do; >> *filename=fname; >> date = input(scan(fname,-2,' '),mmddyy10.); >> retain filename date; >> eov = 0; >> input #5; >> delete; >> end; >>input (index cow lact group)(:??) cdate :mmddyy10. (dim c1-c26 )(:??); >>format date cdate mmddyy10.; >> run; > >Hi, > >I ran into a small trouble when using the codes above. Some times there >are 2 tabulations in a row separating columns. I would need an option that >did the same as the option "treat consecutive delimiters as one" in >Excel... > >Thanks in advance!


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