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 shows 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. A single ABL session user connection does not bind the user connection of any other ABL session.

For information about database management, see Database Administration.

There are two type values that are specific to PAS for OpenEdge 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 the database connection for a PAS for OpenEdge instance using the command-line utilities provided by OpenEdge:
  1. Run the Proenv utility.
  2. Go to your OpenEdge work directory, for example:
    cd C:/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 the UNIX-style environment variable syntax for the directory of your Progress OpenEdge installation. On Windows, use %DLC%.
  5. Change directory to path-to-openedge-work-directory/database.
  6. Start the database server:
    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 sports2020 database:
    oeprop.{bat|sh} AppServer.SessMgr.agentStartupParam=“-db
       openedge-install-path/WRK/database/sports2020”

    This command tells the instance to connect to sports2020 database when the agent starts up.

  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 pasoestart -restart -I oepas1 -timeout 200
  11. Go 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 want to use this procedure as a reference.