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.

 

 

The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.
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

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 978 views
  • 0 likes
  • 3 in conversation