Hi all
A simple macro code here
%let suffix=rank_;
proc sql noprint;
select cats('?"',name,'"n?') into :varr separated by ' '
from dictionary.columns
where upcase(libname)=upcase('move')
and upcase(memname)=upcase('rank')
and upcase(substr(name,1,
length("&suffix")))=upcase("&suffix");
quit;Is generating an error which seems totally unrelated
1 %studio_hide_wrapper;
MLOGIC(STUDIO_HIDE_WRAPPER): Beginning execution.
MLOGIC(STUDIO_HIDE_WRAPPER): %GLOBAL _STUDIONOTES
MLOGIC(STUDIO_HIDE_WRAPPER): %GLOBAL _STUDIOSOURCE
MLOGIC(STUDIO_HIDE_WRAPPER): %GLOBAL _STUDIOSTIMER
SYMBOLGEN: Macro variable _STUDIONOTES resolves to NOTES
MLOGIC(STUDIO_HIDE_WRAPPER): %IF condition &_studionotes = is FALSE
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was:
&_studiosource =
ERROR: The macro STUDIO_HIDE_WRAPPER will stop executing.The program is implemented in sas studio / viya. Any idea about what is generating the error?
Honestly speaking, I had to remove the first "?" in the cats function and the error did not show again. It seems it was related to how that "?" was maybe processed in the macro var creation
proc sql noprint ;
select cats('"',name,'"n?') into :varr separated by ' '
from dictionary.columns
Since the issue happens in a macro that looks like it is auto-called by SAS Studio, I suggest you restart your SAS Studio and try the code in a pristine session.
Agree with @Kurt_Bremser .
I'd be curious what
%put >>&_studionotes<<
would write to the log.
Or maybe better, see what %put _user_; would report as the value of _studionotes.
Honestly speaking, I had to remove the first "?" in the cats function and the error did not show again. It seems it was related to how that "?" was maybe processed in the macro var creation
proc sql noprint ;
select cats('"',name,'"n?') into :varr separated by ' '
from dictionary.columns
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.