Send Extra Parameters .p

mblanch

New Member
Hello Everybody,

there any way to send extra parameters to a program .p?
eg.

in PHP exist the GET mode and I can send parameters for this method
index.php?p1=hello&p2=world

and within the file I can read..

echo "$_GET['p1'] $_GET['p2']".

Then I need to know if exist a similar method for progress programs.

tks.! ;)
 
Well I have a program php, this program call a .sh file. this, contains:

exec /u1/progress/101c/bin/_progres -pf /u1/users/pfs/ege.pf -b -p /u1/users/pilo/ls/xx/source/operaciones/xxegebatch01.p

my cuestion is can I put some instruction or some to send parameters to xxegebatch01.p like php for example (xxegebatch01.p?id=1234&desc=hello_world) and how read this parameters inside xxegebatch01.p
 
The only way you can do this, as mentioned earlier, is to user the -param client startup parameter when you start a Progress runtime session.

Within the session the parameter signature is determined at compile time. That means, there is no way at runtime to add additional parameters or omit some when you do a procedure call (RUN), function call or method invocation. Furthermore, method invocations as introduced with the OO capabilities are even strong typed at compile time.

HTH, RealHeavyDude.
 
Actually, there is a way around the paramter passing issue...

Code:
exec /u1/progress/101c/bin/_progres -pf /u1/users/pfs/ege.pf -b -p /u1/users/pilo/ls/xx/source/operaciones/xxegebatch01.p -param "parameterliststuff"


where parameterstuff = e.g. "id=1234&desc=hello_world"

in your program:
Code:
def var i as int no-undo.
def var parm-cnt as int no-undo.
def var this-param as char no-undo.
def var param-value as char no-undo.
def input parameter myparameters as char no-undo.

parm-cnt = num-entries(myparameters,"&").

if parm-cnt > 0
then do i = 1 to parm-cnt:
    assign
        this-param = entry(1,entry(1,myparameters,"&"),"=")
        param-value = entry(2,entry(1,myparameters,"&"),"=").
    .... do stuff ....
end.
 
You can use session:parameter instead of the input parameter.
ie
test.p
Code:
message session:parameter view-as alert-box.

_progress -p test.p -param ("this is a message")
 
Back
Top