Kbase 21012: 4GL Program to Retrieve the PROPATH of an AppServer Process
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  17/03/2003 |
|
Status: Unverified
GOAL:
How to retrieve the PROPATH of an AppServer process using Progress 4GL
FIX:
This sample code uses a temporary table to store the PROPATH.
The first program, callApp.p, resides on a client workstation.
The second program, getPropath.p, should be in the working directory of the AppServer.
/* Program callApp.p -- located on the client workstation */
DEFINE VARIABLE hAppSrv AS HANDLE NO-UNDO.
DEFINE VARIABLE ret AS LOGICAL NO-UNDO.
DEFINE TEMP-TABLE tPropath NO-UNDO
FIELD tcPropath AS CHARACTER FORMAT "x(60)".
CREATE SERVER hAppSrv.
/* Change the CONNECT statement to your AppServer connection */
ret = hAppSrv:CONNECT ("-AppService -H -S ").
RUN getPropath.p ON SERVER happsrv (OUTPUT TABLE tPropath).
ret = hAppSrv:DISCONNECT().
DELETE OBJECT hAppSrv.
FOR EACH tPropath:
DISPLAY tPropath.
END.
/* Program getPropath.p -- located in the AppServer working directory */
DEFINE VARIABLE iOrder AS INTEGER.
DEFINE VARIABLE cPropath AS CHARACTER FORMAT "x(2000)".
DEFINE TEMP-TABLE tPropath NO-UNDO
FIELD tcPropath AS CHARACTER FORMAT "x(60)".
DEFINE OUTPUT PARAMETER TABLE FOR tPropath.
cPropath = PROPATH.
REPEAT iOrder = 1 TO NUM-ENTRIES(cPropath):
CREATE tPropath.
ASSIGN tcPropath = STRING(iOrder) + ") " + ENTRY(iOrder,cPropath).
END.