The OpenEdge Relational Database Management System (RDBMS) network connection policy allows for one network connection per ABL session in the PAS for OpenEdge multi-session agent. Therefore, the application code and PROMON monitoring are the same for both servers.

However, the self-service RDBMS connection policy works differently. Self-service connections are a shared resource in PAS for OpenEdge. Each multi-session agent creates a single self-service connection that will show up in PROMON as its own user connection. Therefore, each ABL session that executes with a database connection parameter -db or that executes an ABL CONNECT statement shares the self-service connection from its managing multi-session agent and shows up on PROMON with its own user connection. Each ABL session user connection is specific to that session and to no other session. No single ABL session user connection binds in any way the user connection of any other ABL session.

For information about database management, see the Database Administration in Manage the OpenEdge Database.

Two type values specific to PAS for OpenEdge are in the PROMON display:
  • SELF/PASA — A multi-session agent's shared self-service database connection
  • SELF/PASN — Individual ABL session users that share the multi-session agent connection

OpenEdge ships with a sample OpenEdge database in the $DLC directory called sports2020 .

To configure and verify a database connection for a PAS for OpenEdge instance using the command-line utilities provided by OpenEdge, perform the following steps:
  1. Run the proenv utility.
  2. Navigate to your OpenEdge work directory. For example:
    cd install-path/OpenEdge/WRK
  3. Create a folder to store your database:
    mkdir database
  4. Run the following command in proenv to copy the Sports2020 database that ships with OpenEdge into your work directory:
    $DLC/bin/procopy $DLC/sports2020 path-to-openedge-work-directory /database/sports2020
    Note: $DLC is a UNIX-style environment variable syntax for the directory of your Progress installation. On Windows, use %DLC% .
  5. Change directory to path-to-openedge-work-directory /database .
  6. Start the database server by running the following command:
    proserve sports2020
  7. Change to the /bin directory of your PAS for OpenEdge instance. For example:
    cd path-to-openedge-work-directory/oepas1/bin
  8. Use the OEPROP utility to specify the database connection in the Agent Startup Parameter property. The following command shows how to configure a connection to the database sports2020 :
    oeprop.{bat|sh} AppServer.SessMgr.agentStartupParam=“-db openedge-install-path/WRK/database/sports2020” 

    This command tells the instance to connect to database sports2020 on agent startup.

  9. Save the following code to your path-to-openedge-work-directory /oepas1/openedge directory to make it available to your PROPATH as server.p :
    DEFINE OUTPUT PARAMETER custname AS CHARACTER. FIND FIRST customer. ASSIGN custname = name.
  10. Restart your instance using the pasman pasoestart command. For example:
    pasman.{sh|bat} pasoestart -restart -I oepas1 -timeout 200 
  11. Navigate to the OpenEdge working directory.
  12. Run the prowin (Windows) or _progres (UNIX) command to open the Procedure Editor.
  13. Run the following ABL code in the Procedure Editor to test the database connection:
    DEF VAR appHandle AS HANDLE. DEF VAR custname AS CHARACTER. DEF VAR cnctParam AS CHARACTER.
    DEF VAR ret AS LOGICAL. CREATE SERVER appHandle. cnctParam = "-URL http://hostname:port/apsv -sessionModel Session-Managed".
    ret = appHandle:CONNECT(cnctParam).
    IF NOT ret THEN DO:
       MESSAGE "Server not connected". 
       RETURN.
    END.
    ELSE DO: 
       MESSAGE "Connected to PAS for OpenEdge!".
       RUN server.p ON appHandle (OUTPUT custname).
       MESSAGE "First customer is: " custname.
    appHandle:DISCONNECT().
    MESSAGE "Disconnected from PASOE".
    END.
    QUIT.
            
    Note: Modify the cnctParam with the hostname and port of your instance.

    This code displays the first customer name in the sports2020 database. You can save this procedure as client.p if you wish to use this procedure as a reference.