SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Phil_NZ
Barite | Level 11

Hi SAS Users,

I want to work efficiently by using SAS EG, and one function I am really into is the automatically suggestion about function and dataset.

However, regarding dataset, they normally suggest that I need to type the library first then SAS EG will suggest me the dataset inside this library.

I am wondering that is there any way when I type "data" statement, SAS EG will suggest all the datasets that I can choose and "enter" quickly rather than I must type the lib (for example: WORK) first then get the dataset hint from SAS EG. It makes my dataset name looks longer and the lib name plays no role here.

a.jpg

 

 

I am not lazy, but sometimes the library name is just redundant, and I want to optimize and simplify my coding progress as well.

 

Warmest regards.

 

P/S: Even when I call a dataset in set statement., I also need to call the library first and then SAS EG will suggest me the datasets inside. I am not greedy, just want to know if there is any way to shorten the coding progress.

Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

@Phil_NZ wrote:

Hi SAS Users,

I want to work efficiently by using SAS EG, and one function I am really into is the automatically suggestion about function and dataset.

However, regarding dataset, they normally suggest that I need to type the library first then SAS EG will suggest me the dataset inside this library.

I am wondering that is there any way when I type "data" statement, SAS EG will suggest all the datasets that I can choose and "enter" quickly rather than I must type the lib (for example: WORK) first then get the dataset hint from SAS EG. It makes my dataset name looks longer and the lib name plays no role here.

a.jpg

 

 

I am not lazy, but sometimes the library name is just redundant, and I want to optimize and simplify my coding progress as well.

 

Warmest regards.

 

P/S: Even when I call a dataset in set statement., I also need to call the library first and then SAS EG will suggest me the datasets inside. I am not greedy, just want to know if there is any way to shorten the coding progress.


The process is called "typing" if you are coding.

 

 

I suggest that you run this code in your session:

proc sql;
   select libname, memname
   from dictionary.tables
   ;
quit;

That will list all the data sets in all the libraries that would be presented if you had your wish for a "suggestion" based on just "data".

I am guessing that you will get somewhere around 40+ just in the SASHELP library. If you have enough modules installed may be more. SAS Graph for instance will add a couple of map related libraries with a couple hundred data sets in each (one map for most countries in the world, often a second with major features like cities, some with subdivisions like states or counties; continents ).

 

My actual work installation has 15 permanent libraries and anywhere from 1 to 10 temporary libraries depending on what I am working on that day. That code listing data sets runs to 1000's of data sets. Some of temporary libraries are creating/modifying subsets of the permanent data sets and often share some of the same names. I really wouldn't want to just grab the first data set of the name.

 

If you routinely use one library a lot more than others I suggest naming it so  it appears first in the selection list.

Or perhaps set a couple of editor abbreviations for commonly used libraries.

View solution in original post

1 REPLY 1
ballardw
Super User

@Phil_NZ wrote:

Hi SAS Users,

I want to work efficiently by using SAS EG, and one function I am really into is the automatically suggestion about function and dataset.

However, regarding dataset, they normally suggest that I need to type the library first then SAS EG will suggest me the dataset inside this library.

I am wondering that is there any way when I type "data" statement, SAS EG will suggest all the datasets that I can choose and "enter" quickly rather than I must type the lib (for example: WORK) first then get the dataset hint from SAS EG. It makes my dataset name looks longer and the lib name plays no role here.

a.jpg

 

 

I am not lazy, but sometimes the library name is just redundant, and I want to optimize and simplify my coding progress as well.

 

Warmest regards.

 

P/S: Even when I call a dataset in set statement., I also need to call the library first and then SAS EG will suggest me the datasets inside. I am not greedy, just want to know if there is any way to shorten the coding progress.


The process is called "typing" if you are coding.

 

 

I suggest that you run this code in your session:

proc sql;
   select libname, memname
   from dictionary.tables
   ;
quit;

That will list all the data sets in all the libraries that would be presented if you had your wish for a "suggestion" based on just "data".

I am guessing that you will get somewhere around 40+ just in the SASHELP library. If you have enough modules installed may be more. SAS Graph for instance will add a couple of map related libraries with a couple hundred data sets in each (one map for most countries in the world, often a second with major features like cities, some with subdivisions like states or counties; continents ).

 

My actual work installation has 15 permanent libraries and anywhere from 1 to 10 temporary libraries depending on what I am working on that day. That code listing data sets runs to 1000's of data sets. Some of temporary libraries are creating/modifying subsets of the permanent data sets and often share some of the same names. I really wouldn't want to just grab the first data set of the name.

 

If you routinely use one library a lot more than others I suggest naming it so  it appears first in the selection list.

Or perhaps set a couple of editor abbreviations for commonly used libraries.

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

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
  • 1 reply
  • 790 views
  • 1 like
  • 2 in conversation