USER (User Interface)

The USER protocol enables users to create a custom subprogram that can be called from logic to communicate with an external system. A sample file, USER.cpp, is supplied with the Runtime installation.

The User Interface facility enables an application to initiate a transaction to another type of system, and to receive a response from that system. The User Interface provided with Runtime for Windows Operating Systems allows the user to create a C++ subprogram that does the following:

  1. Receives data from the application through the logic of an ispec or report. The ispec or report sets Glb.Destination to USER.EXE (or NON.LINC), then sends the data using the Send built-in persistent class method.

  2. Processes the received data. This may include calls to other types of systems.

  3. Returns the result of the processing to the application.

A graphical representation of the User interface is shown below:

Figure 1. User Interface

User Interface

The user-supplied C++ program must be called USER. It performs the following functions:

  1. Receives a transaction from the application through the logic of an ispec or report. The transaction is formatted as an XML document, and piped into the USER program’s stdin.

  2. Constructs the transaction in the format required by the external system, then passes it to that system for processing.

  3. Waits for a response from the external system.

  4. Constructs the response into an XML format and writes it to stdout.

The User facility handles a single transaction at a time. Processing within the originating ispec or report is suspended until a reply is received.

The User facility can be used in conjunction with NOF (or GLI) to create a two-way interface.