The PROPATH is a list of comma separated directory paths. The OpenEdge client relies on this to find executable code (for the RUN and NEW () statements) and in some case other files (such as images on buttons).
Progress will search each PROPATH component (directory in PROPATH) for what has been specified in the RUN statement. Sub-directories are excluded in the search unless they are part of the relative path/filename specified.
The PROPATH supports relative pathnames; when Progress encounters a period in the PROPATH (".,.\mydir,%DLC%\bin . . ."), the pathname of the current working directory is substituted in this position.
Example:
'RUN x.p' (i.e. without any physical or relative path information) will only succeed if the program physically exists in one of the directories listed on the PROPATH.
'RUN \subdir\x.p" will succeed if a directory on the propath has the subdirectory "subdir", which contains the file "x.p".
The order of the PROPATH directories matters: Any search through the propath will return the first instance of the file found in the PROPATH; instances later in the PROPATH are simply ignored.
This behavior can be useful to deploy patches and/or test versions of code: Place these in a separate directory structure and add those directories to the top of the propath; the patch/test versions will then be loaded before the base versions.
For executable code, there are additional considerations:
When a procedure is run or a class is instantiated the OpenEdge client will search for the compiled .r file as well as the source code file.
Examples using the RUN statement:
PROPATH=folder1,folder2,folder3
RUN x.ra) Will ONLY ever run .r's, never source files (.p, .w, etc...)
b) Will search in order folder1 -> folder2 -> folder3 for x.r and then execute the first instance that it finds.
c) Will return an error in the case that it is not found in any PROPATH folder
RUN x.pWhere NO x.r exists in the PROPATH:
a) Will search in order folder1 .r? .p? -> folder2 .r? .p? -> folder3 .r? .p?
As long as a development license is installed; the first instance of x.p will be compiled on the fly in memory BUT NEVER written to disk.
RUN x.pWhere x.r's exists in the PROPATH:
a) Will search in order folder1 .r? .p? -> folder2 .r? .p? -> folder3 .r? .p?
b) Run the first instance that is found;
i.e.
- If x.r is found before x.p in the same folder, then x.r will be run
- If x.p is found in a folder before (say folder2) the first instance of x.r (in say folder 3), then that x.p will run if a development license is installed
RUN x.w.Where x.r also exists in the PROPATH but is the result of compiling x.p:
a) Will search in order folder1 .r? .w? -> folder2 .r? .w? -> folder3 .r? .w?
b) Run the first instance that is found.
i.e.
- If x.r is found before x.w in the same folder then x.r will be run, even though it is the product of compiling x.p
- If x.p is found it is ignored
- If x.w is found in a folder before (say folder2) the first instance of x.r (in say folder3), then that x.w will run if a development license is installed
This is the sequence of search that will run every time that code is accessed, unless the Quick Request (-q) Client Session parameter is specified, which will force Progress to use a procedure stored in memory first, if it exists, before reading through the files.