Consultor Eletrônico



Kbase P20202: How to list all active 4GL and SQL-92 clients by type?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   28/01/2009
Status: Verified

GOAL:

4GL/ABL: How to list all active 4GL and SQL-92 clients by type?

GOAL:

How to list all currently connected clients and their types (4GL or SQL-92) using the _Connect VST table?

FACT(s) (Environment):

OpenEdge Category: Database
Progress 8.x
Progress 9.x
OpenEdge 10.x
All Supported Operating Systems

FIX:

The following 4GL/ABL procedure uses the _Connect VST table to list the currently connected clients and their types:

DEFINE VARIABLE cClientType AS CHARACTER NO-UNDO.

FOR EACH _Connect NO-LOCK
WHERE _Connect-Usr NE ?
AND _Connect-Type EQ "REMC"
OR _Connect-Type EQ "SELF"
BREAK BY _Connect-Usr:

IF _Connect-Type EQ "SELF" OR _Connect-Device NE ""
THEN
ASSIGN cClientType = "4GL Client".
ELSE
ASSIGN cClientType = "SQL-92 Client".

DISPLAY _Connect-Usr FORMAT ">>>>9" LABEL "_Connect-Usr"
_Connect-Type FORMAT "x(15)" LABEL "_Connect-Type "
_Connect-Device FORMAT "x(15)" LABEL "_Connect-Device"
cClientType FORMAT "x(15)" LABEL "Client Type"
WITH DOWN FRAME FrameName.

DOWN WITH FRAME FrameName.
END.