IBM Books

Net.Data Programming Guide


Invoking Net.Data

You can set Net.Data up to run as a common gateway interface (CGI) program, or with a Web server API like Lotus Go Webserver, Internet Connection Server (ICAPI), Netscape Server (NSAPI), and Microsoft Internet Server (ISAPI) for most platforms. The syntax used to invoke Net.Data depends on how Net.Data is configured. See "Improving Performance" for more information.

Whichever method you use, Net.Data is invoked from a Web browser by either an HTML anchor reference, HTML form, or directly as a URL. Net.Data starts after the Web server receives the reference, form, or URL calling the CGI application or API process. The Web server passes to Net.Data the name of the Net.Data macro file, the name of the HTML block in the Net.Data macro, and any input variables.

If your Net.Data macros take a long time to complete (for example, if they connect to remote databases), consider changing your script timeout value. Usually the default timeout is 5 minutes, which is enough for most macros. See your Web server's documentation for specific instructions.

These examples show the different ways you can invoke Net.Data as a CGI application. The string

cgi-bin/db2www
is used to represent the string that calls Net.Data and is the default for most systems. You can define the string in your Web server's configuration file as described in your Web server's documentation.

server
The name of the Web server. If the server is the local server, you can omit the server name and use a relative URL.

filename.ext
The name and extension of the Net.Data macro file.

block
The name of the HTML block in the specified Net.Data macro file.

method
The HTML method used with the form. POST is recommended.

?name=val&...
One or more optional parameters passed to Net.Data. For example, you can pass a user ID so the application user only needs to enter it once or pass a Net.Data macro name to allow backing out of an application.

ICAPI uses the same syntax as CGI and is managed through the Web server configuration file, httpd.conf. If you use ISAPI or NSAPI, invoke Net.Data as explained in "Using ISAPI" and "Using NSAPI".

A typical URL with parameters looks like this:

http://www.ibm.com/cgi-bin/db2www/queryA.mac/input?field1=custno&field2=custname
Parameters sent to Net.Data from an anchor reference are sent with the QUERY_STRING interface, while HTML form input is sent as standard input.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]