How do I create a macro variable with special character and resolve it.

Accepted Solution Solved
Reply
Senior User
Posts: 1
Accepted Solution

How do I create a macro variable with special character and resolve it.

Can we create a macro variable with a special character in  the macro variable name and resolve it.

 

Example :

 

Proc sql;

select count(*) into : t1a+t2a from sashelp.class;

quit;

 

%put &t1a+t2a;

 

 

 


Accepted Solutions
Solution
‎06-17-2017 08:21 PM
Esteemed Advisor
Posts: 6,661

Re: How do I create a macro variable with special character and resolve it.

Well, Maxim 1 is always your best bet, but Maxim 4 can also show the way.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Esteemed Advisor
Posts: 6,661

Re: How do I create a macro variable with special character and resolve it.

Try it, and you'll see.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
SAS Super FREQ
Posts: 8,720

Re: How do I create a macro variable with special character and resolve it.

Or, look it up in the Macro Language documentation, such as this document specifically #2 and #3 on page 26 and most relevant, #5 on page 27:

http://support.sas.com/documentation/cdl/en/mcrolref/69726/PDF/default/mcrolref.pdf

 

cynthia

Solution
‎06-17-2017 08:21 PM
Esteemed Advisor
Posts: 6,661

Re: How do I create a macro variable with special character and resolve it.

Well, Maxim 1 is always your best bet, but Maxim 4 can also show the way.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 268 views
  • 4 likes
  • 3 in conversation