The difference between @{WORK} and @{ROOT}

Posted by rbf on 06-Feb-2009 05:20

What is the difference between @ and @ and where do you set @ in OEA?

In addition, what is the difference between adding a directory with a prefix of @, @ or as an external directory to your PROPATH?

All Replies

Posted by Simon de Kraa on 06-Feb-2009 05:34

See KB-P126310.

Posted by rbf on 06-Feb-2009 06:03

I know that, but what are the answers to my questions?

Posted by Simon de Kraa on 06-Feb-2009 07:44

Ah, you need answers as well...

I think WORK is the (variable) "start in" directory where prowin32 is started and ROOT is the (fixed) project directory.

And if you use the WORK and ROOT in your propath you can re-use the .propath file for other projects?

Posted by rbf on 06-Feb-2009 08:28

OK I guess I understand WORK (looks pretty familiar).

But what about ROOT? You can define ROOT only once, when you create the project, so you must be pretty damn sure about it. Would ROOT typically a shared network drive where the application is based while WORK is private and contains the code you are maintaining locally?

Even so, what do you do when the central application directory is moved? Create a new project for that new ROOT? The only advantage of ROOT would be that I can reuse .propath in that case, but I would much rather do a search and replace in that file and keep my project! Or even better: use relative pathnames in PROPATH (because then I have neither dilemma), but that does not seem possible in OEA.

Inquisitive minds would like to know the higher meaning of ROOT.

Posted by Matt Baker on 06-Feb-2009 08:44

There are several substitution variables in OEA. Substitution variables are a way to substitute values into the PROPATH ( and a few other minor places) to allow a PROPATH to be shared between users, but each user can have different installation locations for various parts of your environment.

The list is:

WORK, ROOT, APP, DB, and RCODE.

App and DB can be used for anything and set to anything you want. Normally the expectation is you set them to some value that represents the directory your application resides in , and db holds the database(s). In reality those two can be used for anything, and you don't have to use them.

WORK is the working directory for the current project as specified on the OpenEdge project property page. This is the SESSION:WORKING-DIR value as seen from the ABL.

ROOT is the physical file location of the main directory of your project. This is the value you see for the location field on the resources property page. If your project is moved to a different location, then ROOT changes to that new location. Nothing magic. Internally (for anyone that writes java) it is the value of IProject.getLocation()

RCODE is the value set on the build property page. If not set, the substitution variable is simply removed from the PROPATH entry.

The odd syntax (with @) was taken from the same syntax that Progress Explorer uses to represent variables in the ubroker.properties file.

Posted by Matt Baker on 06-Feb-2009 08:47

When you initially create a project WORK and ROOT are set to the same value.

And I forgot one:

TEMP which is the temp directory as set on the OpenEdge project properties page. By default for new projects, this is set to the working directory as specified on the installation; by default c:\openedge\wrk

Posted by rbf on 06-Feb-2009 08:56

Thanks. That clarifies it.

Posted by Matt Baker on 06-Feb-2009 09:01

You certainly can use relative path names. They are always relative to the working directory. You just have to type them in yourself instead of using the file pickers provided by the UI. You can either manually add them to the .propath (yuck), or you can add a directory using the button, and then click edit, and change it to whatever you want.

This thread is closed