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 (May 2008, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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 !!"


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