Try OpenEdge Now
skip to main content
ABL Reference
ABL Syntax Reference : PROPATH statement
 

PROPATH statement

Sets the PROPATH environment variable for the current ABL session.
When you start ABL, it automatically adds the $DLC directory and some subdirectories to your PROPATH. ABL always preserves these directories in your PROPATH, even if you change or clear your PROPATH. Thus, ABL can always find its executables and r-code.

Syntax

PROPATH = string-expression
string-expression
A field, variable, string constant, or combination of these that evaluates to a character string. The character string should be a list of directory paths. The directory names in the path can be separated by commas or by the appropriate separation character for your operating system. The directory pathnames can use the UNIX format for pathnames (/dir1/dir2/dir3, for example) or the standard pathname format for your operating system. Use the slash-separated directory name format if you are concerned about portability across multiple operating systems. In Windows, the pathnames cannot contain characters outside of the non-Unicode code page. See OpenEdge Development: Internationalizing Applications for more information about Unicode and code pages.

Examples

The r-ppath.p procedure displays a strip menu with four choices. The procedure defines three arrays: menu holds the items for selection on the menu, proglist holds the names of the programs associated with the menu selections, and ppath holds the appropriate PROPATHs for each program. The CHOOSE statement allows the user to choose an item from the strip menu.
r-ppath.p
DEFINE VARIABLE menu     AS CHARACTER NO-UNDO EXTENT 4 FORMAT "X(20)"
INITIAL ["1. Sales","2. Acctg","3. Personnel","4. Exit"].
DEFINE VARIABLE proglist AS CHARACTER NO-UNDO EXTENT 4 FORMAT "X(8)"
INITIAL ["sales.p","acctg.p","per.p","exit.p"].
DEFINE VARIABLE ppath AS CHARACTER NO-UNDO EXTENT 4
  INITIAL ["sales/s-procs","acctg/a-procs","per/p-procs",","].

REPEAT:
DISPLAY menu WITH TITLE " M A I N M E N U " CENTERED
1 COLUMN 1 DOWN NO-LABELS ROW 8 ATTR-SPACE.
CHOOSE FIELD menu AUTO-RETURN.
HIDE.
PROPATH = ppath[FRAME-INDEX].
RUN VALUE(proglist[FRAME-INDEX]).
END.
The AVM uses the menu selection number as an index into the ppath and proglist arrays. The AVM sets the PROPATH and runs the program.
This simple example changes and displays the PROPATH:
r-prpath.p
PROPATH = ENTRY(1,PROPATH) + ",/dlc,/dlc/proguide,/dlc/appl1/procs".
DISPLAY PROPATH.

Notes

*Changes to PROPATH last only for the current session. Any subprocesses inherit the PROPATH in effect when the ABL session started.
*When you start ABL, it automatically adds the top directory of the ABL hierarchy and some subdirectories to your PROPATH. If you use the PROPATH statement to make a change, ABL adds the directories you specify to your existing PROPATH.
*ABL replaces separation characters in expression (a colon ( : ) on UNIX; a semicolon ( ; ) in Windows) with commas, so the resulting PROPATH string can be accessed with the ENTRY function. Therefore, file pathnames passed in expression must not include embedded commas.
*If you change your PROPATH, and your old PROPATH included r-code libraries that are not in your new PROPATH, those libraries are automatically closed. If you run a procedure from a closed library, the AVM displays an error message.
*For more information on the PROPATH environment variable, see OpenEdge Getting Started: Installation and Configuration.

See also

ENTRY function, PROPATH function