Com-plete supports the Natural runtime system as documented in the Natural documentation in the section for Com-plete.
Follow the steps for installing Natural under this environment as required.
The Natural installation should be complete and working in the environments where the HTTP server is to run before attempting to support the Natural CGI processing.
The Natural Web Interface is supported by Natural version 3.1 and above.
This document covers the following topics:
A number of additional tasks are required to ensure that the Natural CGI processing operates successfully. Note that the HNANSHEL program delivered with the product is a Natural program itself and an integral part of the Natural CGI processing logic.
Follow the next steps carefully:
Ensure that the HTPvrs Natural library has been INPLed as part of the installation process.
Copy the Natural subprograms USR0050N, USR0330N, USR1025N and USR2013N from the SYSEXT Natural library to the SYSTEM library on FNAT.
As an alternative to this step, when Natural Security is installed, make SYSEXT a STEPLIB in the Natural environment.
If Natural Security is installed, copy the Natural Security Interface Subprogram NSCLI to the SYSTEM library on FUSER.
The following parameters specified in the HTTP server configuration are directly associated with the use of Natural CGI:
A useful way to provide Natural parameters is to specify NATPARM=’PROFILE=HTTP’ (or any other profile name) and set all parameters in that profile in Natural.
A Natural CGI program is invoked using the standard browser URL
http://ip-addr:port/natcgi/program
where 'program' is the Natural program you want to run, which exists in the Natural library specified in the NATLIB configuration parameter.
If you want to provide a Natural library name, use the URL
http://ip-addr:port/natcgi/library/program
where 'library' is the Natural library where 'program' resides.
Note:
All programs to be run using Natural CGI must be cataloged; that
is, they must be in object format.
To test the installation:
Invoke a program that does nothing.
Such a program is provided in the HTPvrs Natural INPL file delivered with Com-plete as HNANWTOP .
Try to invoke it from a web browser using the URL
http://ip-addr:port/natcgi/hnanwtop
You will receive no output at your browser; however, the message in the program should be written to the operator console.
If this is successful, test the sample Natural CGI program:
Ensure that the HNANSAMP program is stowed or cataloged in the default CGI library specified by the NATLIB configuration parameter.
Invoke the URL
http://ip-addr:port/htpvrs/srce/hhannatt.htm
When you enter your name, the HNANSAMP program should be invoked and echo your name back to the browser.
The following should also be taken into consideration when installing Natural CGI:
The Natural start-up program in all environments must be linked with AMODE=31 .
There must be no start-up errors from Natural as this will force Natural to try to write to the terminal or CMPRINT about the errors, which in turn can cause unpredictable results. This will also cause the Natural CGI request to fail.
Note:
This information is provided for compatibility reasons only. The
recommended interface between Natural and the HTTP server is CALL
HAANUPR.
The Natural CGI processing, as described above, must be installed and working correctly, before sucessful operation of the Natural Web Interface is ensured.
Also ensure that the Natural parameter
RPC=(size=32)
is present in the string specified for the
'NATPARM' HTTP server parameter.
The programs NWWAPS and W3APSENV INPLed to the SYSWEB library are an integral part of the Natural Web Interface processing.
To invoke a Natural Web Interface program, use the standard browser URL
http://ip-addr:port/natcgi/sysweb/nwwaps/library/subprogram
where
library | is the Natural library where 'subprogram' resides |
subprogram | is the Natural subprogram you want to run |
If running with Natural Security, you can also call NWWAPS by defining SYSWEB as a steplib of the library named in the URL. For example:
http://ip-addr:port/natcgi/userlib/nwwaps/userlib/usercgi
If SYSWEB is defined in Natural Security as a steplib of USERLIB, then NWWAPS can be called. This is useful, as with Natural security installed, the NWWAPS program cannot call a subprogram from a different library (unless the subprogram is in a steplib of SYSWEB). That is, if the second library named in the URL is different to the first it will be ignored. It is possible to just specify the following:
http://<ip-addr>:<port>/natcgi/userlib/nwwaps/usercgi
Any NWI subprogram that resides in a steplib of USERLIB can also be called.
Note:
All programs to be run using the Natural Web Interface must be
cataloged; that is, they must be in object format.
For additional information about the Natural Web Interface, refer to the Natural documentation.