DATA Step, Macro, Functions and more

question on micro variable

Reply
Frequent Contributor
Posts: 76

question on micro variable

Hi,

Is it possible to a use a micro variable create from  AAA data set by using call symput and call that macro with in AAA data set ? Please explain with example .

Thanks in advance ,

Ashwini

Frequent Contributor
Posts: 139

Re: question on micro variable

Hi Ashwini,

you cannot use the variable in same data step

Super User
Posts: 5,424

Re: question on micro variable

Posted in reply to manojinpec

Actually you can, using the symget function. But it's an odd operation...

Data never sleeps
Contributor
Posts: 69

Re: question on micro variable

Would you post a code sample showing how?

Frequent Contributor
Posts: 127

Re: question on micro variable

Posted in reply to bentleyj1

Here you go:

data test;

      *set AAA;

   var = 1;

      call symput('var', var);

   var2 = symget('var');

run;

Ask a Question
Discussion stats
  • 4 replies
  • 227 views
  • 0 likes
  • 5 in conversation