From: js8765 on
Hi there,

I was wondering if anyone could help me with the following.

Imagine I have a simple macro that does some text manipulation e.g.

%macro myMacro(strInput);
%let strInput2 = &strInput &strInput;
&strInput2
%mend;

Now, I'd like to use this macro in a data _null_ step and pass a string
variable as a parameter e.g.

data _null_;
myString='This is a string';
myString2="%myMacro(myString)";
put 'myString2 is: ' myString2;
run;

As expected, the macro processes the string "myString" as opposed to the
value of the variable.

I thought of using a global variable and "call symput", but then
realised that the global variable just gets assigned its value when the
data step reaches the run statement.

Does anyone know a good way to do this or is my overall approach wrong?

Thanks in advance for any help or information!

js