Registering Clients with the Uniface Router

For a Uniface client application to receive messages send to it via the ProcScript command postmessage by another Uniface application (client or server), it needs to be registered with the Uniface Router. You can register a client application from the command line, in the client assignment file, or in ProcScript.

The Uniface Router maintains a table of registered clients and their paths, and the user name under which they registered. This enables the Uniface Router to send a message to any registered client. The user name is not explicitly provided when registering, but it is captured and stored along with the symbolic name. It is not possible to register under another user name.

The combination of user name and symbolic name must be unique, otherwise the registration will fail.

Note:  A client can only maintain one registration at a time. However, by using the open statement it can repeatedly open the $DNP path and register itself with a different name or with a different Uniface Router.

To register a client with the Uniface Router, do one of the following:

  • Register from the command line using the /dnp and /ust command line switches.

    The only difference between these switches is that /dnp specifies the complete network connection string, whereas /ust relies on this being defined by /dnp or $DNP.

    Microsoft Windows

    uniface.exe/dnp=TCP:HostID+Port|||ClientIDStartUpShell

    or

    uniface.exe/dnp=TCP:HostID+Port/ust=ClientIDStartUpShell

    Unix, Linux

    uniface/dnp=TCP:HostID+Port|||ClientIDStartUpShell

    or

    uniface/dnp=TCP:HostID+Port/ust=ClientIDStartUpShell

    iSeries

    CALL UNIFACE PARM('/dnp=TCP:HostID+Port|||ClientID' 'StartUpShell')

    This call must be submitted using SBMJOB with ALWMLTTHD(*YES) or using SPAWN.

    For more information, see /dnp and /ust.

    • HostId—host machine where the Uniface Router is running. For more information, see Network Connection Strings.

      The HostID field may be left empty, but the pipe symbol is required, for example: tcp:|user1|pass1|ust1

    • Port—TCP port number on the host machine that the client will use for communication with the Uniface Router.
    • ClientID—ID that the client will use to identify itself to the Uniface Router. This name is not case-sensitive.
    • StartupShell—name of the application shell on the client.
  • Register using the client assignment file. Specify the client path in the $DNP setting

    $DNP TCP:HostID+Port|||ClientID

  • Register using the ProcScript open command.

    open "HostID|||ClientID","$DNP"

Related Topics