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
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!
|