Operating Natural Development Server

This document describes how to operate Natural Development Server in a OpenVMS-based environment.

The following topics are covered:


Introduction

Natural Development Server for OpenVMS represents a listener process which waits for incoming Natural clients to connect. For every connection request, the listener starts a Natural process which will then communicate with the corresponding client. Natural Development Server can only be run in a valid Natural environment. For the currently applicable version of Natural for OpenVMS, refer to Empower at https://empower.softwareag.com/.

Starting and Stopping the Natural Development Server Daemon

Before you start the Natural Development Server daemon, you have to make sure that all requirements as described in the section General Information for Starting the Daemons are met. This section is part of the Installation documentation which is provided with Natural for OpenVMS.

When Natural Development Server has been installed, you have to start the Natural Development Server daemon. The command procedure START_NATDVSRV.COM is provided for this purpose. It is stored in the directory NDVDIR:[V<version>.NDV].

When you execute the file SAG$ROOT:[NATURAL]LOGIN.COM, the following command is defined:

NATDVSRV = "@NDVDIR:[V<version>.NDV]START_NATDVSRV.COM"

The Natural Development Server daemon NATDVSRV can be invoked with the following parameters:

Parameter Description
-h[elp] Shows all available Natural Development Server daemon commands.
-p[ort][=]port Starts the daemon with the specified port number.
-s[tart][=]image Optional. When starting the daemon, you can specify the Natural image to be used as the server session.
Natural-parameters Optional. When starting the daemon, you can specify parameters with which the server session is to be started.
-t[erminate][=]port Terminates (stops) the daemon with the specified port number.
-v[ersion][=]version Optional. When starting or stopping the daemon, you can temporarily set the Natural version to the specified version (for example, -v=6340).

Example for starting the daemon:

NATDVSRV -p=1234 -v=vvvv parm=ndv udb=100 pcheck=on kcheck=on

With NATDVSRV, you can specify a maximum of 8 parameters. However, you can put several Natural parameters in quotation marks. Each Natural parameter set in quotation marks is then considered as one parameter. Example:

NATDVSRV -p=1234 parm=ndvtest bp=testbp "udb=100 pcheck=on kcheck=on"

Example for stopping the daemon:

NATDVSRV -t=1234 -v=vvvv

Default values for the port number, the Natural parameter file and the buffer pool name can be defined in NDVDIR:[V<version>.NDV]START_NATDVSRV.COM. When default values have been defined, it is also possible to start and stop the daemon using the following commands:

NATDVSRV START
NATDVSRV STOP

Determining the Screen Size for Web I/O

By default, a screen size of 80x24 is used for web I/O with the Natural Web I/O Interface. This is determined by the following variables:

Variable Name Description
NWO_NCOLUMNS The number of columns to be used. Default: 80.
NWO_NROWS The number of rows to be used. Default: 24.

If a different screen size is to be used, you have to set these variables before starting the development server.

Example

DEFINE  NWO_NCOLUMNS  100
DEFINE  NWO_NROWS  50

Getting Help

natdvsrv [-h[elp]]

displays the help information on the available options.

NDV Configuration File

When a new development server is started, the file NDVSERVER.LOG located in a global etc directory will be accessed to add information about the server.

When a server is terminated, the following steps are performed:

  1. A search of the specified port takes place in order to find the server's process ID. This process ID is then used to terminate the server.

  2. The entry of the terminated server in the configuration file will then be removed.

Trace

A server trace can be established via the built-in trace macros.

Important:
In order to generate trace files for the listener and all started sessions, a plus sign (+) must be used as the trace file name. Otherwise, a new development server session will overwrite an existing trace file.

The name of the listener trace file is constructed as shown below:

natdvsrv_port

where

port is the assigned port number.

The name of a session trace is constructed as shown below:

natdvsess_ipinfo_ pid_port

where

ipinfo is the client connection's IP address/name.
pid is the process ID of the development server session.
port is the port of the listener process.

Example

DEFINE  NCTR_STATE    1
DEFINE  NCTR_CONFIG   device:[directory]nctr.cfg
DEFINE  NCTR_OUTPUT   sys$scratch:+

After a listener process was started on port 4712 and two clients have connected, the following trace files are generated into the directory sys$scratch:

natdvsrv_4712
natdvsess_pc1_1055_4712
natdvsess_pc2_1045_4712

Note:
Be careful when using the plus sign (+) notation. This could cause a lot of trace files to be generated.

Error Messages

When a development server is started or terminated, the following error messages can occur:

Error Number Error Message Action
66 The port number is missing. Provide a valid port number.
67 The specified port number is already in use. Use a port which is not yet occupied on the machine.
68 Invalid syntax [%syntax%] encountered. The options used to start or terminate the server are used wrongly according to [%syntax%].
70 Invalid port number encountered. Use a correct port number inside the valid range of 0 - 9999 and do not use other characters or digits.
71 Listen on specified port failed. Try again with a different port number.
78 The specified server session [%session-name%] is not accessible. Check that the specified session can be found via the PATH environment variable or that it is located inside $NATBIN.
79 The port number [%number%] exceeds upper limit (99999). Use a port inside the valid range.
80 Invalid combination of options [%options%] encountered. Check that the specified options can be used together.
81 NDV server could not be terminated (Reason: %reason%).

Check the reason:

  • Check that the server with the specified port is running.

  • Check that you have the rights to terminate the server.

82 Error accessing file 'NDVSERVER.LOG'. Check that the file is available in NATDIR:['F$trnlnm"NATVERS"'.tmp] and that it has a valid content. If the file is corrupted, delete the file.