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)
Content-Type: text/plain; format=flowed
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.
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.
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>
Subject: Checking if macro exists? (Was Re: Macro Quoting)
Date: Fri, 27 Apr 2007 11:31:50 -0400
>From: Unnat Patel <unnatppatel@YAHOO.COM>
>Subject: %qsubstr OR %qscan
>Date: Thu, 26 Apr 2007 05:54:44 -0700
> 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)
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?
Donít quit your job Ė Take Classes Online and Earn your Degree in 1 year.