Consultor Eletrônico



Kbase P2700: How to see procedures running on appserver on UNIX or charac
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   8/22/2003
Status: Unverified

GOAL:

How to see procedures running on appserver on UNIX or character client.

FIX:

The procedure that can be use is the _asread.p that is in the adecomm.pl library. This library is under the $DLC\gui or $DLC\tty directory.

Here is an example code about how to use the _asread.p (it has been taken , with some modifications, from _asinfo.w):

DEFINE VARIABLE ppath AS CHARACTER NO-UNDO. /* receives Propath */
DEFINE VARIABLE dbs AS CHARACTER NO-UNDO. /* receives List of Databases */
DEFINE VARIABLE pprocs AS CHARACTER NO-UNDO. /* receives List of Running Persistent Procedures */
DEFINE VARIABLE hAsynch AS HANDLE NO-UNDO. /* handle to asynch run */
DEFINE VARIABLE scid AS CHARACTER NO-UNDO. /* receives
SESSION:SERVER-CONNECTION-ID */
DEFINE VARIABLE som AS CHARACTER NO-UNDO. /* receives
SESSION:SERVER-OPERATING-MODE */
DEFINE VARIABLE scbr AS LOGICAL NO-UNDO. /* receives
SESSION:SERVER-CONNECTION-BOUND-REQUEST */
DEFINE VARIABLE scb AS LOGICAL NO-UNDO. /* receives
SESSION:SERVER-CONNECTION-BOUND */
DEFINE VARIABLE scc AS CHARACTER NO-UNDO. /* receives
SESSION:SERVER-CONNECTION-CONTEXT */

/**************************You have to connect to your Appserver here*************************/

/*
* Gather up information from companion program running asynchronously
* on SERVER h
*/
/* below I suppose you can use also tty/_asread.p instead of adecomm/_asread.p */
RUN adecomm/_asread.p ON SERVER h
ASYNCHRONOUS SET hAsynch
EVENT-PROCEDURE "ASInfo":U
(OUTPUT scid, /* SESSION:SERVER-CONNECTION-ID */
OUTPUT som, /* SESSION:SERVER-OPERATING-MODE */
OUTPUT scbr, /* SESSION:SERVER-CONNECTION-BOUND-REQUEST */
OUTPUT scb, /* SESSION:SERVER-CONNECTION-BOUND */
OUTPUT scc, /* SESSION:SERVER-CONNECTION-CONTEXT */
OUTPUT ppath, /* PROPATH */
OUTPUT dbs, /* List of Databases */
OUTPUT pprocs). /* List of Running Persistent Procedures */

WAIT-FOR PROCEDURE-COMPLETE OF hAsynch.
END.

END.


PROCEDURE ASInfo:
/*
* Event procedure for the asnych call we made to _asread
* If receives, assigns and displays the data received.
*/
DEFINE INPUT PARAMETER scid AS CHARACTER NO-UNDO. /* receives
SESSION:SERVER-CONNECTION-ID */
DEFINE INPUT PARAMETER som AS CHARACTER NO-UNDO. /* receives
SESSION:SERVER-OPERATING-MODE */
DEFINE INPUT PARAMETER scbr AS LOGICAL NO-UNDO. /* receives
SESSION:SERVER-CONNECTION-BOUND-REQUEST */
DEFINE INPUT PARAMETER scb AS LOGICAL NO-UNDO. /* receives
SESSION:SERVER-CONNECTION-BOUND */
DEFINE INPUT PARAMETER scc AS CHARACTER NO-UNDO. /* receives
SESSION:SERVER-CONNECTION-CONTEXT */
DEFINE INPUT PARAMETER ppath AS CHARACTER NO-UNDO. /* PROPATH */
DEFINE INPUT PARAMETER dbs AS CHARACTER NO-UNDO. /* List of
Databases */
DEFINE INPUT PARAMETER pprocs AS CHARACTER NO-UNDO. /* Load
selection lists */

DO WITH FRAME {&FRAME-NAME}:
ASSIGN
connid = scid
opmode = som
connreq = scbr
connbnd = scb
connctxt = scc
asppath:LIST-ITEMS = ppath
conndbs:LIST-ITEMS = dbs
connpps:LIST-ITEMS = pprocs
.
DISPLAY connid opmode connreq connbnd connctxt ASppath conndbs
connpps WITH FRAME {&FRAME-NAME}.
END.
END.
/****************************************************************************
another option would be to run the _asinfo.w (Prootols->Appserver information) on a Windows client connected to the appserver on the UNIX box.
****************/