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 2000, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 9 Mar 2000 15:52:48 "GMT"
Reply-To:     "David L. Ward" <dward@SASHELP.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "David L. Ward" <dward@SASHELP.COM>
Subject:      Re: macro as a function
Content-Type: text/plain; charset="us-ascii"

One more note on my previous reply: The only real example that I have ever used this technique was when I had a very peculiar data set handed to me:

VAR1 OP VAR2 1 < 2 23 <= .666 45 / 234

..

I needed to find the answer to the operations described in each row of my data set. Instead of trying to code a select statement for every possible operator, I used the resolve and sysevalf functions. They were slow, but I didn't have THAT much data.

answer=resolve('%sysevalf('||compress(var1)||trim(op)||compress(var2)||')');

It works like a charm and is a very interesting application of the resolve function.

David Ward

_____________________________________________________ Sent by SASHelp.com user DWard SASHelp.com - On-Line SAS Resources Web interface to SAS-L at http://www.sashelp.com/sasl


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