| Date: | Fri, 5 Nov 2004 04:07:49 -0800 |
| Reply-To: | urvir@rediffmail.com |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | urvir palan <urbunti@YAHOO.COM> |
| Subject: | Comma problem |
| Content-Type: | text/plain; charset=us-ascii |
|---|
Hi,
I think this may be one of the way.
data one;
input text $75.;
cards;
,,I am Frank,,,,how are you,
,,,today is Thursday,,nice day
,,,,,
,did you do that,,,not yet,,,
;
run;
data two;
set one;
text=tranwrd(text,',,,,',',');
text=tranwrd(text,',,,',',');
text=tranwrd(text,',,',',');
if substr(text,1,1)=',' then
text=substr(text,2,length(text));
if substr(text,length(text),1)=',' then
text=substr(text,1,length(text)-1);
run;
Urvir
---------------------------------
Do you Yahoo!?
Check out the new Yahoo! Front Page. www.yahoo.com/a
|