| Date: | Sat, 22 Jan 2000 08:39:03 -0600 |
| Reply-To: | "Dwight Eggers (EUS)" <EUSDEE1@AM1.ERICSSON.SE> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "Dwight Eggers (EUS)" <EUSDEE1@AM1.ERICSSON.SE> |
| Subject: | Re: check macro variable exist |
|
| Content-Type: | text/plain; charset="iso-8859-1" |
|---|
I have been slow to pick up on this thread, but when I saw the original
question I decided to throw in my contribution.
For SAS/Intrnet, at least pre version 8, I don't think whether the macro
variable exists is as much of an issue as whether it is populated. As soon
as it has been used once, it exists in the process macro variable space. I
typically assure that the needed parameters are defined within the reset.sas
file and then don't have to include any additional logic to determine
whether they exist. Then within each application script I capture the
parameters being passed from HTML form elements with an sql step of the form
proc sql noprint;
create table _setting as
select name, value as setting
from sashelp.vmacro
where scope='GLOBAL'
and value^=' '
;
and then go through some logic to sort out the multivalued parameters.
This needs to be coupled with an explicit effort to blank out the non-blank
macro variables at the end of a request, and probably some kind of naming
convention for parameters so that you don't pick up everything coming from
the application dispatcher -- at the least, something like an addition where
clause of the form
and name not like '_%'
I think that SCL handles parameter passing a lot better using SCL lists, but
I haven't quite got around to that yet.
The code to purge the global macro variable space could be something very
simple like
proc sql noprint;
select name into :cleanup separated by '= ; %let '
from sashelp.vmacro
where scope='GLOBAL'
and value^=' '
;
quit;
%let &cleanup= ;
This cleanup of the macro variable space also needs to exclude variables
that need to persist beyond the life of the request -- something of the form
and name not in ('perm1' ...)
I haven't worked with the Version 8 Intrnet, but I am expecting to make some
changes with the environment changes that it makes.
I would be very interested in anyones experience along these lines using SCL
lists, and how this scheme will be impacted by Version 8.
Dwight Eggers
Dwight.Eggers@ericsson.com
nilar0538@MY-DEJA.COM wrote:
> Is there anyway of checking a particular macro var is exist. I am
> using SAS/INTRNET broker.exe and like to check which var is passed from
> CGI string. Thanks.
> -NIL
>
|