Try OpenEdge Now
skip to main content
Application Migration and Development Guide
Application Development with PAS for OpenEdge : Programming ABL Client Applications : Connecting to a PAS for OpenEdge instance : Connection examples : Connecting to a session-free PAS for OpenEdge instance
 
Connecting to a session-free PAS for OpenEdge instance
In this session-free connection example, the connection-parameters argument to the CONNECT( ) method contains the -URL and -sessionModel parameters for a remote PAS for OpenEdge instance with the host name, ABLServices, and port, 8810:
DEFINE VARIABLE hInventory AS HANDLE NO-UNDO.
DEFINE VARIABLE lReturn    AS LOGICAL NO-UNDO.

CREATE SERVER hInventory.
lReturn = hInventory:CONNECT("-URL http://slater:OuterLimits64@ABLServices:8810/inventory/apsv
  -sessionModel Session-free").
IF NOT lReturn THEN DO:
  DELETE OBJECT hInventory NO-ERROR.
  RETURN ERROR "Failed to connect to the inventory ABL web application".
END.
IF ERROR-STATUS:ERROR THEN DO:
  lReturn = hInventory:DISCONNECT().
  DELETE OBJECT hInventory NO-ERROR.
  RETURN ERROR RETURN-VALUE.
END.
. . .
lReturn = hInventory:DISCONNECT().
DELETE OBJECT hInventory NO-ERROR.
This code tries to connect the inventory OE ABL Web application running on the remote instance and authenticates the connection for user slater with the password OuterLimits64.