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 (March 2011, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 10 Mar 2011 10:23:30 -0800
Reply-To:     "Sprague, Webb (OFM)" <Webb.Sprague@OFM.WA.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Sprague, Webb (OFM)" <Webb.Sprague@OFM.WA.GOV>
Subject:      Re: "Unpacking" variable in a datastep into a "macro function"
Comments: To: Chang Chung <chang_y_chung@HOTMAIL.COM>
In-Reply-To:  <>
Content-Type: text/plain; charset="us-ascii"

Thanks ! ...

> %macro type(txt); > %let txt=(upcase(compress(&txt," ","psc"))); > (ifc(prxmatch("/RE*MO*DE*L/",&txt),"REMODEL","BUILDNEW")) > %mend type;

What if you have a bunch of regex'es you want to match? The sample I gave only had the two alternatives, but really I have one for REMODEL, SINGLE FAMILY, MULTI, DUPLEX, etc.

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