BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
DrAbhijeetSafai
Lapis Lazuli | Level 10

I have a dataset which has say one lakh records. Now when I have to go to record number 13744, I have to scroll down to that record. I want to ask if there is any better way to directly go that recored?

 

In editor, if one has to go to line number 537, one can use ctrl+g and type 537 there and we can directly go that line number. I want to ask if there is anything similar for viewtable. 

 

Thanks in advance.

 

- Dr. Abhijeet Safai

Dr. Abhijeet Safai
Certified Base and Clinical SAS Programmer
Associate Data Analyst
Actu-Real
1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @DrAbhijeetSafai,

 

For VIEWTABLE see ballardw's solution Re: In VIEWTABLE, How Can I Directly Go to Certain Observation? .

 

Personally I prefer the SAS Universal Viewer (see https://support.sas.com/downloads/browse.htm?fil=&cat=74in those rare situations when I want to scroll through a dataset. I'm using version 1.42 (which is not the most recent one) and it offers the "Go to row [number]" feature:

SAS Universal Viewer (version 1.42)SAS Universal Viewer (version 1.42)

Whether this field is available, however, depends on the "Data Paging" settings. For smaller (!) datasets you may need to reduce the number of observations per page (see menu Tools → Options → Paging). Also, after "Go to row n" the nth row (observation) is the first of the page, so if you actually want to see, e.g., rows n ± 10, you should better "Go to row n−10".

View solution in original post

9 REPLIES 9
FreelanceReinh
Jade | Level 19

Hello @DrAbhijeetSafai,

 

For VIEWTABLE see ballardw's solution Re: In VIEWTABLE, How Can I Directly Go to Certain Observation? .

 

Personally I prefer the SAS Universal Viewer (see https://support.sas.com/downloads/browse.htm?fil=&cat=74in those rare situations when I want to scroll through a dataset. I'm using version 1.42 (which is not the most recent one) and it offers the "Go to row [number]" feature:

SAS Universal Viewer (version 1.42)SAS Universal Viewer (version 1.42)

Whether this field is available, however, depends on the "Data Paging" settings. For smaller (!) datasets you may need to reduce the number of observations per page (see menu Tools → Options → Paging). Also, after "Go to row n" the nth row (observation) is the first of the page, so if you actually want to see, e.g., rows n ± 10, you should better "Go to row n−10".

DrAbhijeetSafai
Lapis Lazuli | Level 10

Thank you @FreelanceReinh  for the information. I wanted this to happen in work library, so Universal Viewer will not work there. However, another thing which you pointed out helped. 

 

You brought my attention to ballardw's solution Re: In VIEWTABLE, How Can I Directly Go to Certain Observation?  again. I had read it many many times but was not able to understand it. This time I got to know why I was not able to understand it.

 

I was not able to understand the meaning of command line. It can be enabled from Tools > Options > Preferences > View. Once this command line is enabled, use of forward on command line was the think I was looking for.

 

Your information about Tools > Options etc., helped me to look for it and that helped to understand command line and after that ballardw's solution made sense. Thanks to ballardw and to you @FreelanceReinh ! 

 

- Dr. Abhijeet Safai

 

 

Dr. Abhijeet Safai
Certified Base and Clinical SAS Programmer
Associate Data Analyst
Actu-Real
FreelanceReinh
Jade | Level 19

@DrAbhijeetSafai wrote:

 I wanted this to happen in work library, so Universal Viewer will not work there.


Why not? You just need to know the path to the directory, which you can retrieve, e.g., from the WORK= system option:

%put %sysfunc(getoption(work));
DrAbhijeetSafai
Lapis Lazuli | Level 10

Interesting! Thanks! 🙂

 

- Dr. Abhijeet Safai

Dr. Abhijeet Safai
Certified Base and Clinical SAS Programmer
Associate Data Analyst
Actu-Real
DrAbhijeetSafai
Lapis Lazuli | Level 10

Hi @FreelanceReinh , 

 

Greetings!

 

I tried using what you had shared. 

%put %sysfunc(getoption(work));

The statement is giving me the current location of the work folder, which is in SAS Temporary Files folder on C drive. 

 

I am able to understand that this path needs to be changed to other path. And files can be accessed from that folder where I can use SAS Universal Viewer.

 

But I am not able to understand how to set this path.  I tried following things:

libname sandbox "Path of the folder";
options work = sandbox;

But that is not working. 

 

Thanks in advance.

 

Thanking you,

Yours sincerely,

 

- Dr. Abhijeet Safai

Dr. Abhijeet Safai
Certified Base and Clinical SAS Programmer
Associate Data Analyst
Actu-Real
DrAbhijeetSafai
Lapis Lazuli | Level 10

Yes @FreelanceReinh , to which, I had asked a further query here(same as the query above), below the same thread. Please let me know if I am missing something while using 'options work' statement etc. Thanks in advance.

 

Thanking you,

Yours sincerely,

 

- Dr. Abhijeet Safai

Dr. Abhijeet Safai
Certified Base and Clinical SAS Programmer
Associate Data Analyst
Actu-Real
FreelanceReinh
Jade | Level 19

@DrAbhijeetSafai wrote:

Yes @FreelanceReinh , which, I had asked a further query here, below the same thread.


The answer I linked to was the reply to that further query.

 

Please let me know if I am missing something while using 'options work' statement etc.


The WORK= system option is one of those options which cannot be changed via the OPTIONS statement. (Note that "OPTIONS statement" is not listed in section "Valid in:" at the top of the documentation of the option.) This is because using an OPTIONS statement requires a running SAS session, which in turn needs an established WORK library. Luckily, you don't need to change the WORK= system option, as explained in my reply of last week starting with "There is no need to change anything. ..."

DrAbhijeetSafai
Lapis Lazuli | Level 10

@FreelanceReinh  Thank you very very much!

 

I understood now that what you mean to say was to find out where the work files are stored on the computer by using 

%put %sysfunc(getoption(work));

to find out 'path' of these work folder files. 

 

Once found out, going opening that file in SAS Universal viewer is expected.  

 

This really helped me to understand it in detail. The 'App Data' folder insider the folder of name of users is generally hidden (it needs to be made unhide). 

 

So finally I was able to view the files in work folder by using SAS Universal Viewer. Thank you for your patience. 

 

Thanks once again!

 

- Dr. Abhijeet Safai

 

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

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 9 replies
  • 1236 views
  • 4 likes
  • 2 in conversation