BookmarkSubscribeRSS Feed
Sebbo
Calcite | Level 5

Hi All,

 

I am unsure what is needed to achieve the following:

 

Adding a custom text box (that only accepts numbers) to the application toolbar in the SAS enhanced editor that has the following function:

when a number is added the following command is run: 

TOP; FORWARD (number-20)

 

The purpose would be to go to the specified row number in a dataset view and show this row number somewhere in the middle of the screen.

 

My questions:

  • Is it possible to add a custom text box that only accepts numbers in Enhanced Editor?
  • Do I need any additional SAS modules on top of SAS base (like SAS/AF)?

 

Thank you!

Sebbo

7 REPLIES 7
ChrisNZ
Tourmaline | Level 20

Ctrl-G  does just that, doesn't it?

Sebbo
Calcite | Level 5
Hi Chris,

Thank you for the response!

Ctrl-G only works in the program editor, not in the dataset view. I want something similar when viewing a dataset.
ballardw
Super User

@Sebbo wrote:
Hi Chris,

Thank you for the response!

Ctrl-G only works in the program editor, not in the dataset view. I want something similar when viewing a dataset.

The topic title you chose of "Add custom text box to the Enhanced Editor" and the text of your question includes:

Adding a custom text box (that only accepts numbers) to the application toolbar 
in the SAS enhanced editor that has the following function:

it is not surprising that you got the Ctrl-G response.

Note that the Display Manage Toolbars are very context dependent. You would want to affect the toolbar for the Viewtable window, not the editor. If you have a Viewtable window active then you have a different toolbar including the Viewtable options like edit row, commit row, sort , form view , table and column attributes. So you are starting with the concept of editing the wrong toolbar.

 

Check the documentation of Viewtable commands for what might be accepted on the toolbar. I don't find any involving a row number as you envision this.

The SAS/AF FSVIEW might, and I say might have something similar but I won't bet on it. Plus the implementation might be considerably more work than you envision.

Tom
Super User Tom
Super User

@Sebbo wrote:
Hi Chris,

Thank you for the response!

Ctrl-G only works in the program editor, not in the dataset view. I want something similar when viewing a dataset.

So you are not using the Enhanced Editor?

What are you using?

ViewTable?

What user interface are you using SAS Display Manager?  Enterprise Guide? SAS/Studio?

 

If you are using SAS Display Manager and you have a command window then perhaps you want a command macro?

ChrisNZ
Tourmaline | Level 20

Why do ask a question for the Enhanced Editor if you want  reply for Viewtable?

I and stuck with EG now sadly, so can't test, but doesn't the command   =20   do that? I'm not too sure, but recall something along like this.

Sebbo
Calcite | Level 5

I have up until now always thought of the 'enhanced editor' as a catch-all name for the combined product (program window, dataset viewer, log window etc.) so my apologies to everyone for the misleading post! As Tom pointed out I should have used the term 'SAS Display Manager' to specify the environment I am working in.

 

Unfortunately '=20' does not work and the best way I have found while searching this topic is the command 'TOP; FORWARD 150' to go to obs 151 in the dataset view. I guess my question was more to do with the ability to make custom modifications to the interface so that I can add something that saves me re-typing this command all the time. 

 

Let me go and investigate the capacity of the command macro or the SAS/AF FSVIEW as suggested.

 

Thanks for the help so far,
Sebbo

 

 

ChrisNZ
Tourmaline | Level 20

> I have up until now always thought of the 'enhanced editor' as a catch-all name for the combined product (program window, dataset viewer, log window etc.) 

That's called the Display Manager System, or DMS. There are two editors in the DMS, including the enhanced one.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 7 replies
  • 1316 views
  • 0 likes
  • 4 in conversation