Date: Thu, 21 Sep 2006 06:08:01 -0700
Reply-To: monal kohli <k_monal_99@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: monal kohli <k_monal_99@YAHOO.COM>
Subject: Re: Call Symput and accessing macro variable in same dataset
In-Reply-To: <E68A1768216E394593B3A390F77725A4096ADF0F@MI8NYCMAIL06.Mi8.com>
Content-Type: text/plain; charset=iso-8859-1
%macro test;
%local count;
data xx;
mon=6;
call symput('count',mon);
count=symget("count");
put "Unable to access " count=;
run;
%mend;
%test;
You cannot access the macro variable which you are
creating in the dataset within the dataset just by
using ¯oname.
You have to use Symget to do the same.
HTH
Monal
--- Rajat Mathur <RMathur@INDUCTIS.COM> wrote:
> Hi,
>
> I am attaching a code snippet I am unable to access
> a macro variable in
> the same dataset where it is created by using call
> symput.
> Can anyone help me how to access this variable?
>
>
> %macro test;
>
>
> %local count;
>
>
> data xx;
>
> set mar06;
>
> call symput('count',mon);
>
> %put "Unable to access &count";
>
> run;
>
>
> %mend;
>
> %test;
>
>
>
> Regards,
> Rajat
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com