Use the Propath
- Last Updated: January 16, 2024
- 6 minute read
- OpenEdge
- Version 12.8
- Documentation
Before you continue on to look at the parameters that you can pass to a
RUN statement, you should understand a little about
how the AVM searches for procedures. When you type RUN
h-CustSample.p, how does the AVM know where to look for it?
The AVM uses its own directory path list, called the Propath, which is stored as part of its initialization (progress.ini) file. When you install OpenEdge, you get a default progress.ini file in the bin subdirectory under your install directory. You can also create a local copy of this file if you want to change its contents.
If you want to look at and maintain your Propath, there is a tool to do that for you. It is one of a number of useful tools you can access from the Procedure Editor.
To access these tools from the Procedure Editor, select . The PRO*Tools palette appears:
You can reposition and reshape the PRO*Tools palette. To retain the palette's new shape and position permanently:
- Right-mouse click on the PRO*Tools
palette outside the area where icons are displayed. The Menu Bar pop-up menu item appears:
- Select the Menu Bar pop-up item. A
File menu appears at the top of the
palette:
- Select . The PRO*Tools Customization
dialog box appears:
Using this tool you can add more useful tools of your own to the palette. For now, however, all you need to note is that the Save Current Palette Position and Orientation toggle box lets you save these settings permanently, so that the PRO*Tools palette always comes up the way you want each time you start OpenEdge.
- Leave the Save Current Palette Position and Orientation toggle box checked on, then click OK.

from the PRO*Tools palette.
As you can see, the AVM first looks in your current working directory (by default, C:\OpenEdge\WRK). This is where it expects to find any procedures you have written and are trying to compile or run. After that it looks in the gui directory under your OpenEdge install directory. This is where it expects to find the compiled r-code for all the ABL procedures that support your development and run-time environments. Remember that most of the OpenEdge development tools, including the Procedure Editor, are themselves written in ABL.
In the gui directory are a number of
libraries, each with a .pl (or .apl) filename extension. These are collections
of many .r files, gathered together into individual
operating system files. The adecomm.pl file, for
example, is a library of many dozens of procedures that are common to the development
tools, called the Application Development Environment (ADE). It is more efficient to
store them in a single library because it takes up less space on your disk and it is
faster to search.
Following these library files is the install directory itself. This holds a
few startup files as well as the original versions of the sports2020
database and other sample databases shipped with the OpenEdge products.
Next is the bin directory. This is where all the executable files are located, including all the supporting procedures for compiling and running your application, which are not written in ABL.
Do not modify any of the directories below the current directory. If you try
to, the AVM resets the Propath, because it recognizes that the tools will stop running
if it cannot find all the pieces it needs. But you can add directories above, below, or
in place of your current working directory. For example, if you save your r-code into a
different directory using the SAVE INTO option on the
COMPILE statement, then you must add this
directory to your Propath.
When you COMPILE or RUN a procedure,
you can specify a partial pathname for it relative to some directory that
is in your Propath. For example, if you save something called NextProc.p into
a subdirectory called morecode, you can run
it using this statement:
|
You can modify your Propath by using the Add, Modify, and Remove buttons in the Propath Editor.
If the AVM is having difficulty locating a procedure that you have written, or if you have different versions of a procedure in different directories you can check to see how the AVM searches for a particular procedure.
To verify which file the AVM finds:
- In the Propath Editor, click the
Search button. The Propath File Search dialog box appears:
- Enter the name of the procedure, including the relative pathname if that
is part of your
RUNstatement. Also include the same filename extension you are using in your code. - Click the Search button. the AVM
displays all the versions of that file it can find, in the order in which it uses
them. Thus the one at the top of the list is always the one the AVM tries to
execute. In this example, the display confirms that when you run
h-CustSample.p, it chooses the.rfile (if there is one) in preference to the source procedure:
If you save your r-code to a different directory (or set of directories) than you use for the source procedures, remember to construct your Propath in such a way that the r-code is found first if it is there, but that the source procedures are also found, at least when you are in development mode, without requiring a special relative pathname in your code to locate them.
In the OpenEdge install directories, for example, all the compiled
ABL procedures are under the gui directory.
The corresponding source procedures are in an equivalent directory
tree, but under an src directory. If you were
to add the src directory to your Propath, then
the AVM could locate source procedures to compile and execute on
the fly as needed. If you were to place the src directory above the gui directory
in your Propath, then the AVM would use all the source procedures
and compile them on the fly because it finds them first. This would
slow down your program execution dramatically. This is just an example
of how, as you develop complex applications, you must be careful
to arrange your Propath so that the AVM can find the procedures
it needs efficiently, without doing a lot of unnecessary searching
or running uncompiled procedures.