DATA Step, Macro, Functions and more

creating macro varible values based on dataset

Reply
Contributor
Posts: 32

creating macro varible values based on dataset

Hi,

 

want create macro varibale from dataset and this macro varible value has to assign same dataset another varible value

 

llike below data set 'Test' ;

 

varible_01  varible _02

xxxx             yyyyyyy

zzzz             ccccccc

ffffff             ggggggg

 

want to assing macro varible 'xxxxx' value as 'yyyyyy'

from each Varible_01 observation convert macro varble and it's value has to assign vairible_02 value

 

Thanks

 

 

Super User
Posts: 23,776

Re: creating macro varible values based on dataset

Posted in reply to RajasekharReddy

CALL SYMPUT() within a data _null_ step. The documentation has examples. 

 

Contributor
Posts: 32

Re: creating macro varible values based on dataset

Can you please provide the document , as i am unable to find that document
Super User
Posts: 10,280

Re: creating macro varible values based on dataset

Posted in reply to RajasekharReddy

Just google for "call symput". You'll get a tankerload of hits.

Narrowing it down with "sas 9.4 call symput" is even more on target.

You need to refine your google-fu.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Respected Advisor
Posts: 4,741

Re: creating macro varible values based on dataset

Posted in reply to RajasekharReddy

I normally restrict my search to support.sas.com

 

The following Google term should give you quite a good result:

site:support.sas.com 9.4 call symput
Ask a Question
Discussion stats
  • 4 replies
  • 196 views
  • 0 likes
  • 4 in conversation