Filepro-list Digest, Vol 28, Issue 25
Boaz Bezborodko
boaz at mirrotek.com
Wed May 10 11:09:31 PDT 2006
filepro-list-request at lists.celestial.com wrote:
>Date: Wed, 10 May 2006 09:07:00 -0500
>From: "Rick Mitchell" <rick.mitchell at sirque.net>
>Subject: Fw: filepro / enviroment variables / putenv
>To: <filepro-list at lists.celestial.com>
>Message-ID: <005301c6743b$01abb300$1404a8c0 at bbswork.com>
>Content-Type: text/plain; charset="iso-8859-1"
>
>
>
>
>I read in March of 2005 the exchange between Ken , JP, and Brian concerning putenv commands.
>
>I have used getenv to get the username from my novell server with no problems for years.
>
>I realise there is and enviorment variable in my XP machines called username but that is the local pc's username, now the network id.
>
>I would like to have a login processing that asks the person for their name and passes it to the environment variable on the pc. I am successful in passing it and reading it in the same table, but once I exit that filepro dclerk session the variable seems to be lost.
>
>login
>
> 1:
> :input aa "Enter your name"
>
> 2:
> :putenv "DOOFUS",aa
>
> 3:
> :exit
>
>
>Once this is run doofus does not appear to the next table which does
>
>logout
> 1:
> :aa=getenv("doofus")
>
> 2:
> :show"@aa="<aa
>
> 3:
> :exit
>
>I don't seem to get the variable in the second process. If this is correct I can do other things like pass a paramter to the login to do a lookup to a table and always check that, or even pass the username before starting filepro.
>
>
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL: http://lists.celestial.com/pipermail/filepro-list/attachments/20060510/d2a393b7/attachment-0001.html
>
>------------------------------
>
>Message: 8
>Date: Wed, 10 May 2006 13:41:41 -0400
>From: Kenneth Brody <kenbrody at bestweb.net>
>Subject: Re: Fw: filepro / enviroment variables / putenv
>To: Rick Mitchell <rick.mitchell at sirque.net>
>Cc: filepro-list at lists.celestial.com
>Message-ID: <20060510134141.j6w0okos8kok4koo at webmail.spamcop.net>
>Content-Type: text/plain; charset="ISO-8859-1"
>
>Quoting Rick Mitchell (Wed, 10 May 2006 09:07:00 -0500):
>[...]
>
>
>>> :input aa "Enter your name"
>>> :putenv "DOOFUS",aa
>>> :exit
>>
>>
> [...] Each process has its own environment. This environment can be
> inherited by that process' children, but it cannot change the parent
> process' environment. In other words, whatever program started the
> filePro program with the above processing will not have its
> environment changed, so any other program started by it will not have
> the new variable, either. -- KenBrody at BestWeb dot net spamtrap:
> <g8ymh8uf001 at sneakemail.com> http://www.hvcomputer.com
> http://www.fileProPlus.com
Rick,
I've done this with Netware, but you have to set the environement
variable using Netware's SET command during the Netware login. I did it
by modifying the server login script which is run before individual
script gets run. Any DOS window opened up will then have this
environment in it.
Boaz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.celestial.com/pipermail/filepro-list/attachments/20060510/48930219/attachment.html
More information about the Filepro-list
mailing list