BookmarkSubscribeRSS Feed
jim_snider
Calcite | Level 5
I am a former PC SAS user, who is now limited to SAS EG on a server. I am accustomed to having SAS Explorer available to quickly access SAS files (browsing). Navigating the Server List to find a file, often having to Refresh the Library, then double-clicking to add it to the project is time consuming. Usually this is a source file I may want to browse.

It would help immensely if there was some code, perhaps undocumented, that would put a file on the project - just as if I had gone through the steps above.
For example, in the code below, if I could put the "mainlib.monthly_data" onto the project, I'd have the file immediately available if I wanted to browse it.


/* Insert code to put monthly_data file in the project */

data testing ;
set mainlib.monthly_data (keep=a b c d) ;

*** additional code ;
run;
4 REPLIES 4
Jay
Calcite | Level 5 Jay
Calcite | Level 5
Quick test of this, using SAS on a PC in EG:

mainlib library was pre-asigned.

Executed your data step and the testing dataset was now in the EG project.

I think the key is the pre-assigment of the library, talk to your SAS server adminstrator this is easy to set up if not already.
jim_snider
Calcite | Level 5
The mainlib would be pre-assigned and would be on the Server List. My question was not in reference to the output file (testing dataset), it was in reference to the source file - mainlib.monthly_data.

Also, I don't know the terminology, but there are 2 different ways a dataset appears in a project.
1. In the process flow - In my example, the output file would be in the project. If I resubmitted the same code, specifying a differently named output file, the 1st output file would no longer be in the project.
2. If I choose a file from the Server list and 'Add to Project', the file is permanently in the project, listed on left side - not in a process flow. The file is only removed from the project if I remove it manually.

In my original question, I was asking about Adding a file to a project in the 2nd manner - permanently.
ChrisHemedinger
Community Manager
Jim,

I think I understand your question, but I don't think there is a way from a command line to do it.

You can use File->Open->Data as a menu item, navigating from the keyboard, to avoid having to click around. (Key sequence Alt+F, O, D to get to the data dialog.)

Chris
Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
jim_snider
Calcite | Level 5
One correction:

*** from prior posting:
If I resubmitted the same code, specifying a differently named output file, the 1st output file would no longer be in the project.

**** ;

When I said that resubmitting the code would take the former output file off the project - that was because of my option "Replace without Prompting".
However, my question is really not concerning output files, it's a desire to put any file I want on the project using SAS code rather than manually finding it on the Server List and then double-clicking or right-clicking and choosing "Add to Project".

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!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1790 views
  • 0 likes
  • 3 in conversation