BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
SherryMichan
Calcite | Level 5

When using SAS GRID / Cloud (both SAS EG 9.4), we used to have the functionality of Ctrl+G to open 'Go To Cell' then we're able to enter the row number we want to go to and it just takes users to that specific observation. 

But in SAS Studio, this functionality is gone. To make matters worse, the maximum number of observations you can see on a single page is only 500 observations. 

I'm having real difficulty using SAS Studio because of this - is this functionality hidden somewhere that I am not aware of? 

Or is the only solution to set the dataset to a new dataset and add a variable to display _n_ then use it to filter? 

1 ACCEPTED SOLUTION

Accepted Solutions
LeliaM
SAS Employee

Beginning with SAS Studio 5.2, we provide the ability to view up to 1000 rows per page. This option is not available with SAS Studio 3.x versions. 

 

Providing the ability to go directly to a row within a table is a feature request that development has on their to-do list.

 

Currently, you would need to use data step logic to go to a specific row in a table.  The data step below creates a new data set that begins with the 6th observation in the table.

data new;
set sashelp.class;
if _n_> 5;
run;

View solution in original post

5 REPLIES 5
LeliaM
SAS Employee

Beginning with SAS Studio 5.2, we provide the ability to view up to 1000 rows per page. This option is not available with SAS Studio 3.x versions. 

 

Providing the ability to go directly to a row within a table is a feature request that development has on their to-do list.

 

Currently, you would need to use data step logic to go to a specific row in a table.  The data step below creates a new data set that begins with the 6th observation in the table.

data new;
set sashelp.class;
if _n_> 5;
run;

SherryMichan
Calcite | Level 5

Thank you, hopefully development team will be implementing this important feature back in. 

This greatly helps in proc compare where the discrepancy lies in 10000+ row but you can't directly go to that row to see the issue in detail unless you go through datastep filters. 

DrAbhijeetSafai
Pyrite | Level 9

Correct!

 

I would like to go view nth record directly. Currently I have to keep scrolling till that record comes but can I go to a particular number of (nth) record directly? It will be a great feature if it could be implemented. 

 

Thank you.

- Dr. Abhijeet Safai

Dr. Abhijeet Safai
Certified Base and Clinical SAS Programmer
Associate Data Analyst
Actu-Real
antonbcristina
SAS Employee

You can always isolate just one observation (x) and print it with the following:

 

proc print data=sashelp.class(firstobs=x obs=x);
run;

 

ballardw
Super User

"Specific observation" can have more than one meaning. You seem to imply that you want a specific observation number. If that is the case do you want any more of the data set or just that observation?

 

Another data step approach is to use the FIRSTOBS dataset option. The following shows the data set starting with the 5th observation in the source set.

data temp;
   set sashelp.class (firstobs=5);
run;

If you want only that obs couple it with the OBS= option:

data temp;
   set sashelp.class (firstobs=5 obs=5);
run;

Another meaning of "specific observation" is observations with specific values of a variable, which I find more useful than the observation number approach because data sets get sorted, have observations dropped or added and the "number" changes. A Where statement can find all the observations with combinations of specific values.

data temp;
   set sashelp.class;
   where age=12;
run;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1050 views
  • 3 likes
  • 5 in conversation