Try OpenEdge Now
skip to main content
Application Migration and Development Guide
Application Development with PAS for OpenEdge : Programming ABL Client Applications : Running and managing remote procedures : Understanding proxy procedure handles : Accessing proxy procedure handles
 
Accessing proxy procedure handles
You can obtain access to the proxy procedure handle in the client using the SET option of the RUN statement, which returns the proxy procedure handle value to the HANDLE variable you specify.
You can also access all proxy procedure handles that are currently active for a server connection by returning the value of the FIRST-PROCEDURE attribute or the LAST-PROCEDURE attribute on the server handle for the connection. You can then use the NEXT-SIBLING or PREV-SIBLING attributes on the resulting procedure handle to navigate the list of active proxy procedure handles.
For example:
DEFINE VARIABLE hProxy  AS HANDLE NO-UNDO.
DEFINE VARIABLE hServer AS HANDLE NO-UNDO.

/* Create server handle for hServer and connect to a server. Call remote
persistent procedure on the server. */
hProxy = hServer:FIRST-PROCEDURE. /* First proxy handle */

/* Display the pathname of the file that contains the remote procedure active
on the server for each proxy procedure handle. */
DO WHILE NOT hProxy = hServer:LAST-PROCEDURE:
  DISPLAY hProxy:FILE-NAME.
  hProxy = hProxy:NEXT-SIBLING.
END.
DISPLAY hProxy:FILE-NAME. /* Procedure pathname for last proxy handle */