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
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 4 replies
  • 1455 views
  • 0 likes
  • 3 in conversation