Desktop productivity for business analysts and programmers

How can I easily change file path?

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 16
Accepted Solution

How can I easily change file path?

I have recently moved my research folder so that now the file paths in my Process Flow are wrong. I know I can manually change each file in my PF, but this is tedious. Also, now that my research files are in my DropBox folder and linked to my office computer, I would like to be able to work from both machines. Unless I can quickly change the base file path, this idea seems untenable. Any suggestions?


Accepted Solutions
Solution
‎09-01-2011 04:13 PM
Occasional Contributor
Posts: 16

Re: How can I easily change file path?

Thanks all for the tips, but I do believe they are overkill for my situation. Sometimes we get so steeped in complixity (e.g. PhD preparation), that we forget that easy solutions still do exist. To wit:

Solution: moved both my DropBox folders from each machine's My Documents folder, which have different roots, to c:\.  Then I just had to update the PF file paths on one machine and I'm done. I could smack myself for wasting time on this. Thanks again though.

View solution in original post


All Replies
Esteemed Advisor
Posts: 7,294

How can I easily change file path?

DS,

While I'm not familiar with EG, it requires the same critical ingredient of every other system design effort: sufficient planning and then enactment of those plans.  A nice article, with some good how to suggestions, can be found at: http://www.sascommunity.org/wiki/Determining_the_filepath_root_in_Enterprise_Guide

Occasional Contributor
Posts: 16

Re: How can I easily change file path?

Hi Art,

Thanks for the response. I don't think this is quite what I need for my situation. I did try following the steps, but got stuck here:

Defining the EG Default File Path

So you will want EG in each environment to point to the appropriate directory. Assuming there is a separate Metadata Server for each environment you can accomplish this by going into SMC for each environment and:

    • Expand Server Manager
    • Expand SASMain
    • Expand SASMain - Workspace Server
    • Right click on SASMain - Workspace Server (at the bottom of the tree)
    • Select Options
    • Select Advanced Options
    • Select File Navigation Tab
    • Select Path and fill in the right value for the current environment (e.g., Dev or Test or Prod or whatever)

I can't find the Server Manger referenced. Again though, I think this is more than I need (my server knowledge is quite limited fyi). Perhaps I was not clear enough in my original post, let me try again:

1. I have SAS/SG on two machines. One is my laptop and the other my work desktop.

2. My research folder (with code and data) is linked to both via DropBox.

3. The Problem: the root path to my /DropBox/Research Folder is different on each machine.

4. Since I want to change one Process Flow and have it saved within project and then updated via DB to the other machine, I would like to be able to easily change the root file path within the Process Flow. Perhaps with two programs I can run before starting to work, depending on which machine I am on.

Valued Guide
Posts: 2,111

How can I easily change file path?

Doc,

I have had to do that in EGuide before; I don't have the metadata server, so Art's approach didn't work for me.  The first time is painful, but then the maintenance is easy.

You have to convert all of your direct file names to libnames.  You can leave WORK, but you will even need to redefine SASUSER as that points to the C:drive by default.  So, decide on the LIBNAMES that you need and set them up in the project.  I usually create a separate process flow for assigning the libnames, autoexec works well for me in EG 4.3. 

Create the libnames for one locale.

Connect them together in a path (right-click, then link to).

Get everything working with those libnames.

For the second locale:

In the same process flow.

Create a separate set of libnames, with the same names, but pointing to the other locale.

thread them together.

The threads are nice because you can right-click on the first one and run them all.

If you set the autoexec to run automatically when opening the project, then put the locale that you use most often later in the process flow.  When you are in the other locale, you can just re-run the first thread.

This approach works with the point-n-click of EGuide.  If you want to write code, you can use the SAS macro language and the various  &sys____ macro variables to find out which system you are on and assign the libnames appropriately.  It is more elegant, but a bit less transparent.

Doc Muhlbaier

Duke

Solution
‎09-01-2011 04:13 PM
Occasional Contributor
Posts: 16

Re: How can I easily change file path?

Thanks all for the tips, but I do believe they are overkill for my situation. Sometimes we get so steeped in complixity (e.g. PhD preparation), that we forget that easy solutions still do exist. To wit:

Solution: moved both my DropBox folders from each machine's My Documents folder, which have different roots, to c:\.  Then I just had to update the PF file paths on one machine and I'm done. I could smack myself for wasting time on this. Thanks again though.

Esteemed Advisor
Posts: 7,294

Re: How can I easily change file path?

Glad to hear that you found a way to do what you want but, do realize, doing dissertation research is just the start of one's career.  When you get out into the "real" world, think carefully about how one's data, code and output are or should be stored.  When one is working on the equivalent of 20 or 30 dissertations simultaneously, and have an unknown number of people working on the different projects, the use of the c:\ drive won't be sufficient.  It is the one drive in Windows that has a defined limit above and beyond storage capacity.

Occasional Contributor
Posts: 16

How can I easily change file path?

Art, I completely agree. While my focus is on learning the theory, econometrics, and stat software, I do pay attention and appreciate more and more the importance of good data management for the start of a project.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 579 views
  • 6 likes
  • 3 in conversation