|Date: ||Wed, 7 Oct 1998 08:23:34 -0700|
|Reply-To: ||"Lund, Pete" <Peter.Lund@CFC.WA.GOV>|
|Sender: ||"SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>|
|From: ||"Lund, Pete" <Peter.Lund@CFC.WA.GOV>|
|Subject: ||Re: Remove a character from a string|
|Content-Type: ||text/plain; charset="iso-8859-1"|
You can use the datastep TRANSLATE function inside the macro %SYSFUNC
function to accomplish this:
%let newstr = %sysfunc(translate(&origstr,%str( ),:));
All this does is say "translate all the colons into spaces". This is a
simple example of the power of the %SYSFUNC macro function that allows
use of almost all datastep and SCL function against macro variables.
I took the liberty of changing your variable name to ORIGSTR so as not
to cause confusion with the macro %STR function.
WA State Caseload Forecast Council
From: Mike Davenport
Sent: Wednesday, October 07, 1998 6:55 AM
Subject: Remove a character from a string
I have the following macro variable
I need to remove the colons and end up with a macro
"ABC DEF GHI"
dose anyone have any suggestions.