DATA Step, Macro, Functions and more

MacroVariable with commas

Reply
Contributor
Posts: 45

MacroVariable with commas

Hi,

 

I have a macrovariable:

%LET A = 01,02,03;

I have a macro:

%macro B(A);

I want to call my macro

%B(&A.)

I undestood that because of the commas, I should write

%B(%superq(&A.))

It is working when I call the macro. But when the macro begins to be written I got this error:

 

ERROR: Invalid symbolic variable name 01,02,03.

Can you tell me what I should do here?

Thanks.

Super User
Posts: 6,928

Re: MacroVariable with commas

[ Edited ]

The %superq function does not expect the contents, but the name of a macro variable as argument:

%B(%superq(A))

 

 

PS Maxim 1: Read the documentation:

http://support.sas.com/documentation/cdl/en/mcrolref/69726/HTML/default/viewer.htm#p0ldeqll9sabzcn1j...

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 1 reply
  • 95 views
  • 0 likes
  • 2 in conversation