BookmarkSubscribeRSS Feed
PaigeMiller
Diamond | Level 26

In SAS Viya/SAS Studio, when I select a word by double-clicking on it, the word now has a blue background, and so does all the other occurrences of this word. What is the usefulness of coloring the background of all the occurrences of this word, rather than coloring only the one word I clicked on? How does coloring of all occurrences of this word help me perform any action? See example

 

PaigeMiller_0-1778077254755.png

 

 

Furthermore, if I get distracted for a second (or more), I don't remember which of these occurrences of this word I double-clicked on, they are almost identical shades of blue, how can I tell which one I double-clicked on? Is it possible to have a different background color for the one word I double-clicked on?

--
Paige Miller
5 REPLIES 5
acordes
Rhodochrosite | Level 12

I cannot help you with that, I have the same color coding kicking in, but it doesn't bother me.

 

But I see that you're probably using proc sql on cas tables. Take a look at the fedsql instead. It's much faster but it has its own flavor and some limitations regarding proc sql.

Here's some code to get you started:

 

proc cas;
source MPG_toyota;
		create table public.result1{options replace=true} as 
			select a.sales_res as feb_sales_res, b.sales_res, case when round(a.sales_res-b.sales_res,3)=0 then 1 else 0 end as flag 
               from RISKNOBA.REMA_FEB22_FMT_OUT a inner join RISKNOBA.REMA_DEC21_FMT_OUT b 
			on a.bastidor=b.bastidor  ;
endsource;
fedSQL.execDirect / query=MPG_toyota;
quit;

 

joeFurbee
Community Manager

@PaigeMiller

I don't have an answer for why this occurs, but you may wan to fill out a Product Suggestion Form here in the Communities. They are reviewed on a regular basis.


Join us for SAS Community Trivia

SAS Bowl LXI - SAS at 50 and SAS Innovate Recap
Wednesday, May 27, 2026 at 10 am ET.
PaigeMiller
Diamond | Level 26

@joeFurbee wrote:

@PaigeMiller

I don't have an answer for why this occurs, but you may wan to fill out a Product Suggestion Form here in the Communities. They are reviewed on a regular basis.


At the moment, I don't want to change it. I want to understand how this coloring is helpful to me. If it turns out that it is not helpful, I will use this product suggestion form.

--
Paige Miller
ChrisHemedinger
Community Manager

This is a common behavior in code editors. Highlight one token/keyword, all matching occurrences also highlight (usually in a more subtle color scheme -- but in SAS Studio it seems to be the same). I see it in SAS editors (not PC SAS, but EG & Studio), Notepad++, VS Code, etc.

 

It's useful in many scenarios, such as seeing all occurrences of a variable name or before embarking on a find/replace operation. Some editors have a preference option you can set to disable this (but I don't think SAS Studio has an option for this).

Become an Explorer! Join SAS Analytics Explorers to learn and complete challenges that earn rewards!
Tom
Super User Tom
Super User

That is not unique to VIYA.  The SAS/Studio interface used in SAS ODA does the same thing.  I have seen similar things in other editors WORD and VSCODE.  I believe the idea is to let you know where else that text appears.  That might be useful if you planned to do a global replace

 

In regular SAS/Studio you can find your cursor again if you press the left or right arrow key.  That will move the cursor and remove the highlighting.