About the Natural Web I/O Interface

#### Search Results

Search

# About the Natural Web I/O Interface

This document describes the purpose and the functions of the Natural Web I/O Interface.

- What is the Natural Web I/O Interface?

- Components of the Natural Web I/O Interface

- Executing a Natural Application in a Web Browser

- Client-Server Compatibility

- Terminology

- Restrictions When Using the Natural Web I/O Interface with Natural Applications

## What is the Natural Web I/O Interface?

The Natural Web I/O Interface is used to execute Natural applications in a web browser. It fully supports the following:

- The display and input of Unicode characters. See Unicode Input/Output Handling in Natural Applications in the Unicode and Code Page Support documentation which is part of the Natural documentation for the different platforms.

- Rich internet applications developed with Natural for Ajax.

## Components of the Natural Web I/O Interface

The Natural Web I/O Interface consists of a server and a client.

### Server

The Natural Web I/O Interface server enables you to use a browser as the I/O device for Natural applications. The server does the user authentication, creates the Natural session and handles the I/O between Natural and the client. The Natural Web I/O Interface server is installed on the same machine as the Natural application. For further information on the Natural Web I/O Interface server, see the Natural documentation for the different platforms.

### Client

The client handles the communication between the user's web browser and the Natural Web I/O Interface server. It converts the output from the Natural application to web pages, and returns the user input to Natural.

Two types of client are supported:

- Natural Web I/O Interface client for displaying character-based applications in the web browser. Maps with GUI controls are not supported in this case. For further information on this type of client, see the Natural documentation for the different platforms.

- Natural for Ajax for displaying rich internet applications in the web browser.

The client is installed on a web/application server. This can be done on any machine in the network.

## Executing a Natural Application in a Web Browser

The Natural Web I/O Interface receives data from a Natural application and delivers web pages to the user's web browser. This is illustrated in the following graphic:

The communication steps for executing a Natural application in the web browser are:

1. The user enters the address (URL) of a logon page in the web browser. The client then displays the logon page in the web browser.

   Note
   For information on how to invoke and configure the logon page, see Client Configuration.

2. The user enters all required information for starting a Natural application into the logon page. This information is sent to the client.

3. The client asks the Natural Web I/O Interface server to start the requested Natural application for this user.

4. The Natural Web I/O Interface server checks the supplied user ID and password, creates a Natural session for the user and starts the Natural application.

5. The Natural application returns the first application screen which is then transferred via the Natural Web I/O Interface server to the client and finally as a web page to the web browser.

Different web browsers are supported. Note that cookies and JavaScript must be enabled in the web browser. For a list of the currently supported web browsers, see the browser prerequisites for the type of client that you are using.

## Client-Server Compatibility

The following rules apply:

- The Natural Web I/O Interface server can work with any client that has the same or a higher protocol version.

  If the server detects that the client is using a version that is lower than the server version, the server replies that the client is too old and the connection is closed.

- The client can work with any server that has the same or a lower protocol version.

  If the client detects that the server is using a version that is lower than the client version, the client switches to the server version. However, new client functionality is not supported in this case.

- The Natural Web I/O Interface server must have the same protocol version as the Natural process that is started by the server. If Natural detects that the server is using a different protocol version, an error message is sent to the user and the connection is closed.

## Terminology

On the different Natural platforms for which the Natural Web I/O Interface is supported, different techniques are used for implementing the server part of the Natural Web I/O Interface. On Natural for Linux, it is implemented as a daemon. On Natural for Windows, it is implemented as a service. On z/OS, it is implemented as a server. In this documentation, the general term "server" is therefore used for all different kinds of implementation.

## Restrictions When Using the Natural Web I/O Interface with Natural Applications

There are several restrictions when using the Natural Web I/O Interface with Natural applications on Linux, z/OS or Windows hosts.

Note
The term "application" refers to application software. It does not refer to system software or software for development.

The following restrictions apply:

- GUI controls
  GUI controls are not supported: dialogs, buttons, radio buttons, list boxes, list views, check boxes etc. The Natural Web I/O Interface only supports Natural applications developed without GUI controls.

- File transfer
  File transfer (for example, with the `DOWNLOAD` statement) is not supported by the Natural Web I/O Interface.

- Runtime errors
  Sample Natural error transaction:
  This restriction applies to older Natural versions on Linux and Windows. As of version 6.3.3, this restriction no longer applies.

  Runtime errors in Natural applications are not handled by the Natural Web I/O Interface. This leads to a loss of the session. Bypass: use the Natural system variable `*ERROR-TA` to handle the error.

  Sample Natural error transaction:

      DEFINE DATA
      LOCAL
      1 ERR_INFO
        2 ERR_NR(N5)
        2 ERR_LINE(N4)
        2 ERR_STAT(A1)
        2 ERR_PNAM(A8)
        2 ERR_LEVEL(N2)
      END-DEFINE
      INPUT ERR_INFO
      DISPLAY ERR_INFO
      TERMINATE
      END

- Terminal commands
  Terminal commands are not supported. They do not work when entered in the Natural for Ajax client.

- Natural system variable *INIT-ID
  When using the Natural for Ajax client with Natural applications on Linux, z/OS or Windows hosts, the Natural system variable `*INIT-ID` will not be filled with a value for the terminal type. On Linux and Windows, it will contain the value "notty". On z/OS, it will contain a session ID that is unique on that server.

The following restrictions apply to Natural on Linux and Windows hosts (z/OS does not have these restrictions):

- Return to the Natural main screen
  You must not use Natural applications that return to the Natural main screen as this leads to wrong screen display and a loss of the session.

- Natural editors and utilities
  You must not use Natural utilities such as `SYSMAIN` or `SYSDDM` and editors such as the program editor as this leads to wrong screen display and a loss of the session.

- Natural system commands
  You must not use any Natural system command such as `CATALL`, `FIND`, `GLOBALS`, `HELP`, `KEY`, `LIST`, `RETURN`, `SCAN`, `SETUP` or `XREF` as this leads to wrong screen display and a loss of the session.

### On this page

- What is the Natural Web I/O Interface?
- Components of the Natural Web I/O Interface
- Executing a Natural Application in a Web Browser
- Client-Server Compatibility
- Terminology
- Restrictions When Using the Natural Web I/O Interface with Natural Applications