I can't work out why I am unable to call a macro within an rsubmit
call.
For example, I have the code:
%let var= year;
%put &var; /* this works fine and prints "year" to the log */
rsubmit;
proc sql;
%put &var; /* this does not work */
The second instance throws up the warning WARNING: Apparent symbolic reference VAR not resolved.
Why can i not reference the macro within the rsubmit code, and how could i adapt to allow for this?
For reference, if i shift the creation of the macro within the rsubmit it works fine - for example:
rsubmit;
proc sql;
%let var= year;
%put &var; /* prints "year" as expected */
however, I am looking to assigning the macros at the start of my code - and also looking to understand why wouldn't work before.
rsubmit; <assignments> endrsubmit;
block without having to pass them from local to remote. Otherwise if you need to have them available on both systems then go with Adam's answer. – DaBigNikoladze