Kbase P143342: How to determine the port on which the DB was started programmatically?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  3/20/2009 |
|
Status: Unverified
GOAL:
How to determine the port on which the DB was started programmatically?
GOAL:
How to determine the port a client is connected to programmatically?
FACT(s) (Environment):
All Supported Operating Systems
Progress 9.x
OpenEdge 10.x
FIX:
This information can be obtained by querying the Virtual System Tables. The VSTs _Connect and _Server are of particular interest here.
The sample code below for instance would return a list of of all Server processes and their port number, with 0 being the broker process:
FOR EACH _Servers:
DISPLAY _Server._Server-Num
_Servers._Server-PortNum.
END.
The _Connect VST would allow you to obtain the number of the remote server you are connected to (if you are connected remotely), cross-referencing it with the _Server._Server-Num would then allow you to determine the actual remote server port you are connected to.