Date: Thu, 26 Oct 2006 21:32:57 +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: getoption
In-Reply-To: <1161897938.350167.304060@i3g2000cwc.googlegroups.com>
Content-Type: text/plain; format=flowed
Frank ,
That makes sense, you cant have a variable with two values it is either one
or the other. Guess SI went with the long form given it would be more
intuative.
Toby Dunn
The obscure we see eventually. The completely obvious, it seems, takes
longer. ~Edward R. Murrow
Think like a man of action, act like a man of thought. ~Henri Louis Bergson
Alice came to a fork in the road. "Which road do I take?" she asked.
"Where do you want to go?" responded the Cheshire cat.
"I don't know," Alice answered.
"Then," said the cat, "it doesn't matter."
~Lewis Carroll, Alice in Wonderland
From: Frank DiIorio <frank_diiorio@YAHOO.COM>
Reply-To: frank_diiorio@YAHOO.COM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: getoption
Date: Thu, 26 Oct 2006 14:25:38 -0700
I just remembered where I got bit by the aliasing issue. It was
retrieving values from DICTIONARY.OPTIONS and SASHELP.VOPTION, and it
was **not** a problem with GETOPTION. For example:
proc sql; select optname, setting from dictionary.options where
optname="LS";
doesn't work (doesn't recognize the LINESIZE alias).
My apologies for the confusion.
For those who are interested in using the OPTIONS table, have a look at
page 2 of:
http://www.codecraftersinc.com/pdf/DictionaryTablesRefCard.pdf
Regards,
Frank DiIorio
On Oct 26, 10:29 am, frank_diio...@yahoo.com wrote:
> All I can say is that at some point in time - obviously not right now -
> what I said was, as my daughter used to say, "the simple truth."
>
> f.
>
> On Oct 26, 8:43 am, datan...@GMAIL.COM ("data _null_;") wrote:
>
> > Same for my version 8.2.
>
> > NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0)
> > NOTE: This session is executing on the WIN_SRV platform.
> > 1 %put %sysfunc( getoption( ls, keyword )) ;
> > LS=89
> > 2 %put %sysfunc( getoption( NOmprint, keyword )) ;
> > NOMPRINT
>
> > On 10/26/06, Peter Crawford <Peter.Crawf...@blueyonder.co.uk> wrote:
>
> > > Frank
>
> > > I don't understand !
>
> > > >The other gotcha is GETOPTION does not recognize option aliases.
>
> > > On my laptop, win-xp sas913-sp4
>
> > > 223 option mprint ;
> > > 224 %put %sysfunc( getoption( ls, keyword )) ;
> > > LS=106
> > > 225 %put %sysfunc( getoption( NOmprint, keyword )) ;
> > > MPRINT
>
> > > What are these aliases that getoption does not recognise?
>
> > > And do you know if there will ever be a corresponding function ?
> > > setoption()
>
> > > Regards
>
> > > Peter Crawford
>
> > > On Wed, 25 Oct 2006 18:23:32 -0700, Frank DiIorio
> > > <frank_diio...@YAHOO.COM> wrote:
>
> > > >There are a couple of additional things to keep in mind when using
> > > >GETOPTION:
>
> > > >If your intent is to capture an option setting, modify the option,
then
> > > >restore the original setting (e.g., altering, then resetting OBS in
a
> > > >macro), use the KEYWORD parameter.
> > > >GETOPTION(obs)
> > > >will return 100, 0, etc., but
> > > >GETOPTION(obs, keyword)
> > > >will return OBS=100, OBS=0, etc.
>
> > > >The other gotcha is GETOPTION does not recognize option aliases.
> > > >Specify LINESIZE, rather than LS, for example.
>
> > > >Regards,
> > > >Frank DiIorio
>
> > > >On Oct 25, 7:33 pm, d...@DKVJ.BIZ (David Johnson) wrote:
> > > >> Mindy,
>
> > > >> The following code:
>
> > > >> %Put %SysFunc( GetOption( SOURCE) );
> > > >> Options NoSource;
> > > >> %Put %SysFunc( GetOption( SOURCE) );
> > > >> Options Source;
> > > >> %Put %SysFunc( GetOption( SOURCE) );
>
> > > >> produces the following log.
>
> > > >> 1 %Put %SysFunc( GetOption( SOURCE) );
> > > >> SOURCE
> > > >> 2 Options NoSource;
> > > >> NOSOURCE
> > > >> 5 %Put %SysFunc( GetOption( SOURCE) );
> > > >> SOURCE
>
> > > >> Note that the option name is not quoted when you use the macro
function.
>
> > > >> I hope this helps.
>
> > > >> kind regards
>
> > > >> David- Hide quoted text -- Show quoted text -
_________________________________________________________________
Try the next generation of search with Windows Live Search today!
http://imagine-windowslive.com/minisites/searchlaunch/?locale=en-us&source=hmtagline
|