BookmarkSubscribeRSS Feed

I have been working with SAS now about 2 years. Coming from other softwares like SATA, I loved the flexibility of SAS code, the diversity and the power.

However, many things could be imrpoved, especially when it comes to the way SAS uses/displayes the data variables/table columns.

STATA had a great feature: It displayed the names of the data variables / tables columns headers in a tab so that you dont need to remeber them or get en error when you misspell them. Double clicking the variable name in STATA inserts it into the line code directly, which is very handy

1b.png

This becomes very frustrating in SAS when you are working on multiple projects, each of which might have several tables and tens of variables.

SAS enterprise with its Intellisense/auto-complete, but nevertheless the feature dosent always solve the issue (still needs improving)

I am wondering whether there is a way in SAS to get the variables displayed like STATA or is it a feature that should be requested to make life easier when using SAS?

SAS Studio (online version) dose have this feature by the way... though you cant double click it to insert into code text like STATA

Kind regards

Am

12 Comments
Shmuel
Garnet | Level 18

What SAS platform are you using ?

 

In most cases you can choose display either thr LABEL (variable header) or the variable NAME.

The way to do the change may differ according to the tool (platform, procedure) you use.

ammarhm
Lapis Lazuli | Level 10
I'm using SAS 9.4, is it possible to show the variables as a tab just like the way the libraries are displayed?
Shmuel
Garnet | Level 18

Look for VIEW menue while displaying the table.

ammarhm
Lapis Lazuli | Level 10

Please refer to my initial question and feature suggestion. The question I asked is unfortunatly not solved by the "view menu".  

The option you are mentioning simply displays the table columns details. It dose not give the functionally I suggested. 

Am

Reeza
Super User

Assuming you're using Base SAS then it seems the direction has been to not develop the IDE here, instead if was focused in EG and now SAS Studio. 

EG was included with a SAS license and I suspect SAS Studio is similarilu bundled though not sure. 

 

FYI - if you right click a table, select properties the view has the list of variables and types but you can't copy and paste it into code. 

ammarhm
Lapis Lazuli | Level 10

Thanks Reeza

I guess it makes sence that Base SAS is not intended to be an IDE, though smaller additions like the one I suggested would make working with data a lot easier.. at least for me.

I guess the option would be otherwise to move to EG, though I like the cleaner interface of Base SAS

Thanks Again Reeza

Kind regards

Am

Tom
Super User
Super User

It really seems SAS is not doing much with upgrading the Display Manager interface.  But if you ar eusing Display Manager you could take a couple of steps and get something close to what you want.

1) Open the VAR window for the dataset. There are GUI ways to do this, but you can also just use the VAR statement from the command line.

2) Right click in the VAR window and select COPY.

3) Open a new empty program windows (Enhanced or Old PGM window).

4) Paste the variable list into that window.

 

Now you can use your new program window to copy and paste the variable names from.

ballardw
Super User

I'm not quite sure I understand what you mean by "tab" as viewtable, which is the base SAS table viewer, does not have any tabs. The column heading can change from label to variable name using the view menu. If you want to change the default behavior make the SAS explorer the active window, go to the tools menu, select options, Explorer. go to the Members tab, select TABLE and then the entry for &Open. Edit the command to look something like:

 

VIEWTABLE %8b."%s".DATA colheading=name

 

I have a number of other options set but this will open tables with the colheading option on.

You will likely want to do the same for VIEWS. Search the online help for VIEWTABLE syntax to find commands that might be useful.

JodyC_SAS
SAS Employee

In the 3.5+ SAS Studio release, you can drag the highlighted table or variable names from the Libraries pane into the code window. More details can be found online under "Add table and variable names to your code" in the article, "Tips for Programming Efficiently in SAS Studio". 

 

BeverlyBrown
Community Manager
Status changed to: Under Consideration