Natural Web Online Documentation SYSWEB3

This section covers the following topics:


General Information

The online documentation files are prefixed with E3* and T3*. The online documentation contains example programs that can be displayed and executed online. Depending on your installation of the Natural Web Interface, call the subprogram NAT-DOCU from the library SYSWEB3 to display the main page of online documentation at your web browser.

Example of the URL to call the online documentation:
http://yourserver/yourcgi3/sysweb3/nat-docu

Note:
To display the online documentation, the HTTP Server Extensions of the Natural Web Interface must be installed and a correct Natural RPC/DCOM Server has to be started. To access the program USR1057N, of library SYSEXT, add a steplib to SYSEXT or copy the programs to your system library.

Definition of Parameters
i/ Input Variable.
o/ Output Variable.
/o Optional Variable.
/m Mandatory Variable (has to be specified) .
/M Mandatory Variable. If empty, specific parts will not be generated.
/H Variable will be translated to HTML.
/X Variable will be translated to XML.
/U Variable will be translated to URL.

Basic Modules

The basic module names of the Natural Web Interface, start with the prefix W3.

They provide the communication between Natural subprograms and the HTTP Server Extension. All other programs of the Natural Web Interface use these programs.

It is possible to make some administrative changes to define the amount and format of the transferred data, to change conversion tables and to change the error page.

Program Description
W3BINARY Writes binary data to the internal binary buffer.
W3CLEAR Clear the output page.
W3CONTENT-TYPE Sets the content type of a document.
W3COUNTER Returns the maximum number of bytes and the number of currently written or free bytes in the output area.

W3ERROR
W3ERROR-TEMPLATE
W3ERROR-TEMPLATE-XML
W3ERROR-TEXT

Generates a default error page.

W3HTML
W3HTMLLINE
W3HTMLDYNAMIC
W3HTMLLINEDYNAMIC
W3HTMLARRAY

Writes an HTML string to the output page and converts special characters to an HTML-valid representation.

W3HTTP
W3HTTPDYNAMIC
W3HTTP-HEADER
W3HTTPARRAY

Writes HTTP settings to the output page.
W3INFO Returns internal settings.

W3INIT
W3END

Initializes SYSWEB3 and prepares the document for returning to the HTTP server.
W3LIMIT Sets the maximum return page size. See W3COUNTER above.

W3LIST-ENVIRONMENT
W3LIST-ENVIRONMENT-TO-DYNAMIC

Lists all variables.
W3LOCATION Sets the location of a page that is to be called instead this page.
W3MIME-DATA Evaluates the required data type (binary or alpha) for the given mime-type.
W3MIME-TYPE

Evaluates the file extension for a given mime-type.
Evaluates the mime-type for a given file extension.

W3READ-ENVIRONMENT
W3READ-ENVIRONMENT-ARRAY
W3READ-ENVIRONMENT-TO-DYNAMIC

Reads a variable sent by the HTTP server.

W3READ-ENVIRONMENT-TEXTAREA
W3READ-ENVIRONMENT-TEXTAREA-DYN

Reads a variable set by a text area and splits the variable into separate lines.
W3READ-ENVIRONMENT-GROUP Reads all environment variables with the same name.
W3READ-INPUT Reads all data delivered from the HTTP server.

W3TEXT
W3TEXTLINE
W3TEXTDYNAMIC
W3TEXTLINEDYNAMIC
W3TEXTARRAY

Writes a text string to the output page.
W3NEWLINE Writes a linebreak to the output page.
W3SOURCE-TO-XARRAY Reads a complete Natural source into one single x-array.

W3TEXT-TO-HTML
W3-ASCII-HTML-TABLE

Converts ASCII to the specific encoding of HTML.

W3TEXT-TO-XML
W3-ASCII-XML-TABLE

Converts ASCII to the specific encoding of XML.

W3TEXT-TO-URL
W3-ASCII-URL-TABLE

Converts ASCII to the specific encoding of URL.

Template / XSLT Processing

Program Description
W3REPLACE Search the output page for a specific string and replace with a new one.
W3LOAD-RESOURCE Load a file from the resource directory of a specific Natural library as result document.
W3READ-RESOURCE Read a file from the resource directory of a specific Natural library into a dynamic variable.
W3WRITE-RESOURCE Write a dynamic variable to a file at the resource directory of a specific Natural library.
W3CHECK-RESOURCE Check if resource exits. If not, a new resource can be created.
W3DELETE-RESOURCE Delete a resource from the resource directory.
W3APPLY-XSLT-XML Apply a stylesheet to transformation on the output page.
W3APPLY-XSLT-RESOURCE Apply a stylesheet, saved as resource on the output page.
W3APPLY-XSLT-XML-TO-DYNAMIC Apply a stylesheet, to transformation to an dynamic variable.
W3LIST-RESOURCE List all resource files of a specific Natural library.
W3READ-OUTPUT Read the already written output page.

HTML Extension

The prefix H3 is used for all program names of the HTML extension. This external subroutines, delivered with source code, generate HTML and use the basic modules of the Natural Web Interface.

The programs do not cover the complete syntax of HTML. They also do not support special enhancements of specific web browser. If you need enhancements, feel free to extend the programs delivered in source code, or create your own ones.

Program Description HTML Tag
H3-ANCHOR Creates an anchor tag.

<A... >... </A>

H3-BUTTON Creates reset/submit buttons.

<INPUT... >

H3-CHECKBOX-GROUP Generates a checkbox group.

<INPUT... >

H3-COMMENT Creates a comment line.

<!... >

H3-HEADER Generates a header tag.

<Hn>

H3-IMAGE Generates an image tag.

<IMG... >

H3-INPUT Generates a text, password or hidden input field.

<INPUT... >

H3-LINE-BREAK
H3-LINE_BREAK

Sets a line break with or without additional text.

<BR>

H3-OPEN-FORM
H3-CLOSE-FORM

Starts a form tag for input fields.

<FORM>... </FORM>

H3-OPEN-HTML
H3-OPEN-HTML-JAVASCRIPT
H3-CLOSE-HTML

Starts and ends an HTML Document.

<HTML>... </HTML>

H3-OPEN-LIST
H3-LIST-ITEM H3-CLOSE-LIST

Generates an ordered, unordered, menu or directory list.

<OL>... <LI>... </OL>
<UL>... <LI>...</UL>
<DIR>... <LI>... </DIR>
<MENU>... <LI>... </MENU>

H3-PARAGRAPH Generates a paragraph with additional text.

<P... >

H3-RADIO-GROUP Generates a radio button group.

<INPUT... >

H3-RULE Sets a horizontal rule.

<HR... >

H3-SCROLLING-LIST Generates a scrolling list.

<SELECT>
... <OPTION> ...
<SELECT>

H3-TABLE
H3-TABLE-COLOR

Generates a table.

<TABLE... >
<TR><TH> ... </TH></TR>
<TR><TD... > ... </TD></TR>
...
</TABLE>

H3-TAG Generates a universal tag.

<tag>

H3-TEXT-AREA Generates a 'text area'.

<TEXTAREA> ... </TEXTAREA>

H3-TEXT-TO-HTML Converts the content of a Natural string to 'HTML'. replace with -> W3TEXT-TO-HTML  

H3-TEXT-TO-URL
H3-ASCII-URL-TABLE

Converts the content of a Natural string to 'URL decoded'. replace with -> W3TEXT-TO-URL  

H3-TIME_DATE
H3-TIME-DATE

Generates a 'time/date' string.

generated: Mon, 17 Jan 2005 15:35:18 GMT

Utilities

Online

Program Description
WEB-ONL or WEB-ONL3 Runs Natural Web Interface subprograms online.
HTM-NAT See Conversion Program HTML to Natural with SYSWEB3

Remote

Program Description
NAT-LIB Lists all Natural libraries.
NAT-DATA Lists all header/data (binary, alpha, unicode?) delivered from the HTTP server.
NAT-DIR Lists the contents of a specific Natural library.
NAT-DIRR Lists the resource contents of a specific Natural library.
NAT-ENV Lists all parameters passed to a called Natural subprogram.
NAT-HTML Displays a Natural source containing HTML.
NAT-INFO Displays the current Natural Web Interface settings.
NAT-LIST Displays a Natural source object.
NAT-DOCU Displays the online documentation.
NAT-RES Displays a non-Natural file - resource (only platform shared resources are available).

Demonstration Applications

The demonstration application delivered shows simple file maintenance with select functions. The demonstration is based on the Adabas file EMPLOYEES. To run the application, Adabas has to be active.

The implementation of the demonstration application uses templates, XML and XSLT, name prefix D6* Depending on your installation of the HTTP Server Extensions, call the subprogram D6INDEX from the library SYSWEB3.

Example of the URL to call the demonstration application:
http://yourserver/yourcgi/sysweb3/d6index

All pictures used are delivered with the Natural Web Interface. Save them in the directory pictures on your HTTP-server in the remote directory PICTURES. If you want to use another remote directory name, set the environment variable PICTURES at the initialization file of your HTTP Server Extension with the specific remote directory name.