Date: Wed, 7 Feb 1996 15:09:42 GMT
Reply-To: "Paul A. Thompson" <pat@po.CWRU.Edu>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: "Paul A. Thompson" <pat@PO.CWRU.EDU>
Organization: Case Western Reserve University, Cleveland, OH (USA)
Subject: Re: Help with another macro problem
In a previous article, johnw@MAG-NET.CO.UK (John Whittington) says:
>On Mon, 5 Feb 1996, in response to the comment:
>
>>> Oh, no you cannot use a symget to retrieve a macro variable value in
>>> the same data step that it was created in.
>
>from Arjen Raateland <raateland@VYH.FI>, Karsten Self
><karsten@NEWAGE1.STANFORD.EDU> wrote (using SAS log to spare him the need to
>write words :-):
>
>>10 data _null_;
>>11
>>12 x = 'I''m not really here';
>>13 call symput( 'mv', x );
>>14 y= symget( 'mv' );
>>15 put y= ;
>>16 run;
I don't believe this result. If it was run twice (inadvertently), the
results above would show.
Macro values are not set until the RUN. That's the rule.
--
Paul Thompson, Ph.D. |
Department of Psychiatry |
Case Western Reserve Univ|
Cleveland, OH 44106 |
|