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 (April 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 27 Apr 2007 16:13:55 +0000
Reply-To:     toby dunn <tobydunn@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         toby dunn <tobydunn@HOTMAIL.COM>
Subject:      Re: Checking if macro exists? (Was Re: Macro Quoting)
Comments: To: chang_y_chung@hotmail.com
In-Reply-To:  <200704271531.l3RAko33017051@mailgw.cc.uga.edu>
Content-Type: text/plain; format=flowed

Chang ,

Hmmm I cant be for certain but Id say nope there aint one. On the other hand one can simply hit the options find the relavent paths (I didnt say it was going to be easy), then check against the Macro names listed there.

Toby Dunn

You can see a lot by just looking. ~Yogi Berra

Do not seek to follow in the footsteps of the wise. Seek what they sought. ~Matsuo Basho

You never know what is enough, until you know what is more than enough. ~William Blake, Proverbs of Hell

From: Chang Chung <chang_y_chung@HOTMAIL.COM> Reply-To: Chang Chung <chang_y_chung@HOTMAIL.COM> To: SAS-L@LISTSERV.UGA.EDU Subject: Checking if macro exists? (Was Re: Macro Quoting) Date: Fri, 27 Apr 2007 11:31:50 -0400

>From: Unnat Patel <unnatppatel@YAHOO.COM> >Reply-To: unnatppatel@YAHOO.COM >To: SAS-L >Subject: %qsubstr OR %qscan >Date: Thu, 26 Apr 2007 05:54:44 -0700 > >Hi All, > > I have macro variable which can have macro name OR valid SAS >statments. (macro variable gets generated from variable) I would like >to write condition to check whether parameter contains macro name OR >SAS statments. (e.g. if first character is "%" then it is macro name >otherwise not) I tried %qsubstr and %qscan but "Scenario II" is not >working. (please see SAS code for both scenarios as below) ....

Hi,

It is an interesting idea to pass a piece of sas code or a macro call as a parameter to another macro, although I am having difficulty thinking of practical uses or benefits of this particular design. In any way, this line of thought lead me to a question of whether there is a way for us to check if certain macro is available to be called, once we are give the macro name.

In the case of macro variable, we can check if it exists with %symexist() or symexist function, but do we have something similar for macro's, like %symMacroExist() or something? Or am I asking something impossible?

Cheers, Chang

_________________________________________________________________ Don’t quit your job – Take Classes Online and Earn your Degree in 1 year. Start Today! http://www.classesusa.com/clickcount.cfm?id=866146&goto=http%3A%2F%2Fwww.classesusa.com%2Ffeaturedschools%2Fonlinedegreesmp%2Fform-dyn1.html%3Fsplovr%3D866144


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