reading environment vars

freneksi

New Member
Hello,

I'm writing a vbs script that runs a predefined progress programme that I would like to pass parameters to, like the 'output to csv' filename.
It is very easy to define envir vars in VBS, but how easy is it to read them in progress ?

regards

Ward
 
you can use OS-getenv() for that.

You can also pass parameters with the -param option if you run the progress program.

Casper.
 
Thx for replying
However, my passed parameter is taken literally,ie not the value but the name of the parameter is used .

this is the VBS part :
...
output2csv="c:\temp\myfile"
wscript.environment.item("output2csv")=output2csv
....
this is the receiving end in 4GL :

SESSION:date-format = "MDY".
DEFINE VAR vom AS CHAR.
DEFINE VAR totaal AS DECIMAL.
DEFINE VAR bestemming as CHAR.

bestemming=Os-getenv("output2csv").
output to bestemming.
....
So somewhere on my filesystem a file called bestemming is created with the results, whereas I expected the result to arrive in c:\temp\myfile


thx for any assistance
 
Back
Top