Date: Mon, 2 Mar 1998 08:56:14 +01:00
Reply-To: Martin Kleiner <kleinerm@MSG.DE>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Martin Kleiner <kleinerm@MSG.DE>
Organization: gedo/msg Koeln
Subject: Re: Using an SCL-list in two methods
In-Reply-To: <199803011725.SAA28882@gate.msg.de>
> Date: Fri, 27 Feb 1998 13:29:28 EET
> Reply-to: Arjen Raateland <raateland@VYH.FI>
> From: Arjen Raateland <raateland@VYH.FI>
> Organization: Finnish Environment Administration
> Subject: Using an SCL-list in two methods
> To: SAS-L@UGA.CC.UGA.EDU
Hi Arjen,
the second method does not know the S-List SAVED. At first you can put your
S-List in a ENVLIST (local or global). Or you can build a CLASS around your
methods an make SAVED a instance variable.
Hope that helps
Martin
Arjen wrote:
> I must confess that I've never before used SCL-lists nor Methods.
> Below is a shortened piece of code, of which the second part doesn't
> work.
> The first method is called at the start of the application and the
> latter
> when the applications ends.
>
> At the start the current value of the SASAUTOS-option is saved in a
> list called SAVED
> and then changed. This works. I can see the result in the
> OPTIONS-window.
>
> However the latter method RESET doesn't recognize the SAVED list it
> seems.
>
> What did I forget or miss? I have looked in the manuals for a suitable
> function, but no result.
>
> TIA,
>
> /* Initialization and deinitialization for the VKL application. */
>
>
>
> SET:
>
> method versio $ ;
>
> saved = makenlist('L', 'maclib') ;
>
> saved = setnitemc(saved,
>
> compress(optgetc('sasautos'),'()'), 'maclib') ;
>
>
> if optsetc( 'sasautos',
>
> "('%sysget(_sas_appl_root)\appl\vkl\makrot' " ||
> getnitemc(saved, 'maclib') || ")" )
> then _msg_=sysmsg() ;
>
>
>
> endmethod ;
> return
> ;
>
>
>
> RESET:
>
> method ;
> if optsetc('sasautos', '(' || getnitemc(saved, 'maclib') || ')' )
>
> then _msg_=sysmsg() ;
>
>
> endmethod ;
>
> return ;
>
> Sorry for the poor layout. Our NEWS-reader gives us a pathetic 300 sec
> to post, probably counted from the start of the NEWS-reader.
>
> --
> --... ...-- -.. . --- .... ..--- --.. .- --..
> Arjen Raateland, SAS Support
> Finnish Environment Institute
> Helsinki, Finland
> .-.-. -.-
>
Martin Kleiner
msg-gedo mbH
Max-Planck-Strasse 40
Tel: 0049-2233-9721-228
Fax: 0049-2233-9721-72
EMail: M_Kleiner@msg.de
|