run "setenv DBDATE Y2MD/"
This did not work. Does anyone know of a work-around?
Thanks in advance
:I have tried to change DBDATE from within 4gl using:
:run "setenv DBDATE Y2MD/"
:This did not work. Does anyone know of a work-around?
:Thanks in advance
Check the FAQ or some other info on www.iiug.org. It's in there
somewhere.
Nils.My...@idg.no
NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway
My opinions are those of my company
The Informix FAQ is at http://www.iiug.org
Two things:
1. RUN causes a sub-shell to execute, it doesn't set anything in your
current shell.
2. There might be a fgl_setenv() function - I know there is a fgl_getenv()
function.
Why do you want to do this - there might be a better (or different) way of
doing it.
HTH.
--
Ciao,
Billy
+------------------------------------------------------------------------------+
| I used to be indecisive, but now I'm not so sure... |
+------------------------------------------------------------------------------+
PLEASE let me know that you receive my mail(s).
Thanks, Andrej Falout
True, because RUN initiates a sub-shell, and you can't pass variables back
to a parent shell.
You should not need to do this. If so, then your design is wrong. If you
simply wish to run the same program with two different values of DBDATE,
then use something like a shell script to set the variable and then call
your 4GL program.
Give us more detail on what you are trying to achieve.
Hope this helps,
--
Mark.
+-------------------------------------------------------------------------+
|Mark D. Stock - The West Solutions Group http://www.west.co.za |
| The Informix FAQ is at http://www.iiug.org |
|mailto:ma...@west.co.za +------------------------------------------------+
|Tel: +27 11 803 2151 |If it doesn't work... force it! |
|Fax: +27 11 803 2189 |If it breaks... it needed replacing anyway! |
|Cell: +27 83 250 2325 |Well, that's how I code anyway! |
+------------------------+------------------------------------------------+
Further, even if you manage to get the environment set correctly (it can be
done -- I wrote some code to do that and it is in the CGI stuff that is/was
available from http://www.informix.com) you then start to run foul of the
problem that many of the environment variables used by a program are read
just once, so changes after the program first reads the value have no effect.
Yours,
Jonathan Leffler (jo...@informix.com) #include <disclaimer.h>