| Date: | Fri, 30 May 2008 17:14:36 -0700 |
| Reply-To: | abshakes <ab_shakes@YAHOO.COM.SG> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | abshakes <ab_shakes@YAHOO.COM.SG> |
| Subject: | %IF usage to compare Strings |
| Content-Type: | text/plain; charset=iso-8859-1 |
Hi Guys,
Question1
I am having problems with comparing Strings using %if in a macro setting.
For example : I know that CommandString = Slope ;
But I want the Value of the macro variable : i.e.
CommandString = Slope ; Level ;
whenever CommandString = Slope ;
I use the following code:-
%if &CommandString=slope %str(;) %Then %CommandString=level%Str(;)slope%str(;);
But unfortunately, the above code returns False even though its True.
Question2
Is there a way to break out of a loop in Macro? Inother words if a loop in the macro returns an error, it keeps repeatingt till the program crashes....in other words is there a way I can break oout of the loop dynamicaly and resume it with a new dataset?
Your help is highly appreciated.
Many Thanks !!
"I am not arrogant ... only better thaaaan yyyyou !!"
|