Geting Computer Name

moahrs

New Member
Dear Friends,

I searched in forum, but not found. I need know the name of computer where my program is executing. In my enterprise, the program run in local computer, with database shared in a server.

Does anyone know how I get the computer name?



Ty a Lot
Moacir Jr.
 

RealHeavyDude

Well-Known Member
You don't say anything about the Progress/OpenEdge version or the OS this should run.

On Windows you can retrieve it from an environment variable (coded in Firefox IDE - therefore not syntax checked but you should get the idea):
OS-GETENV ( "COMPUTERNAME").

I'll take it that there is an equivalent for *nix - but I can't remember it right now.

Heavy Regards, RealHeavyDude.
 

Cringer

ProgressTalk.com Moderator
Staff member
You can probably do it with a dll call, but you could just use the "hostname > myfile.txt" command in OS-COMMAND and then parse myfile.txt.
 

moahrs

New Member
You don't say anything about the Progress/OpenEdge version or the OS this should run.

On Windows you can retrieve it from an environment variable (coded in Firefox IDE - therefore not syntax checked but you should get the idea):
OS-GETENV ( "COMPUTERNAME").

I'll take it that there is an equivalent for *nix - but I can't remember it right now.

Heavy Regards, RealHeavyDude.

Very thank you for the tip. This command works very fine in progress 10.1A/windows.
 
Top