BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
dcortell
Pyrite | Level 9

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?

1 ACCEPTED SOLUTION

Accepted Solutions
dcortell
Pyrite | Level 9

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

View solution in original post

3 REPLIES 3
Quentin
Super User

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.

 

 

dcortell
Pyrite | Level 9

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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1282 views
  • 0 likes
  • 3 in conversation