Unix Command to change the propath in progress program

Vivek Mohan

New Member
Hi All,
Is there any way to control the propath dynamically from Progress in MFG/PRO?
I've tried using UNIX SILENT command to change the propath during the run time but not succeded.
Can any one suggest on this?
Eg: During runtime, I would like to change the curent system propath i.e., I would like to over write the system propath with the Propath given in the Progress code.
My main aim is to check some list of programs(reading from input file) using GREP in the appropariate propath from the Progress program directly.
Thank you.
 

medu

Member
why would you want to use a system command for that, you can simply change PROPATH inside progress session... like in: PROPATH = PROPATH + ";/my/new/propathentry'.
 

Vivek Mohan

New Member
Actually i have some 1000 program names, for those programs i need to find grep in production path (/path/prodpath/src/). so am sending these program names as a file to a developed program to find the grep. The developed new program taking the home path (/homepath/mypath/src/) as the propath. i have changed the propath by using PROPATH = "/path/prodpath/src/" + "," + PROPATH. but still its taking my homepath as the propath. because of this reason only am trying to use system command.
 

medu

Member
propath separator is os dependent - for *nix think it's ':' not comma... better yet use the one that works on both nix and windows which is ';'
 

TomBascom

Curmudgeon
This whole thing sounds VERY confused. Especially this part:
Actually i have some 1000 program names, for those programs i need to find grep in production path (/path/prodpath/src/). so am sending these program names as a file to a developed program to find the grep. The developed new program taking the home path (/homepath/mypath/src/) as the propath. i have changed the propath by using PROPATH = "/path/prodpath/src/" + "," + PROPATH. but still its taking my homepath as the propath. because of this reason only am trying to use system command.

I've tried to figure out what you're saying in there and I'm totally confused.

Anyhow --

You can change PROPATH within your session, there is a pre-defined 4GL variable called "propath" which inherits from the environment on startup -- but that only applies to your session. Programs that you invoke with RUN, the SEARCH function, FILE-INFO and other things that are sensitive to PROPATH within that session, will know about it but it won't be inherited by any other session nor will a spawned process inherit it.

If you shell out to UNIX and set the PROPATH environment variable that will do exactly nothing. Unless the very same OS-COMMAND executes a "pro" or "mpro" like this:
Code:
os-command value( 'PROPATH="newpath"; mpro dbname -p something.p" ).

In that case the mpro session will use "newpath" for its PROPATH. The parent session will be unaware of the change (that's how environment variables work).

Lastly, "grep" doesn't give a fig about PROPATH in any event.
 
Top