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.
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