Net.Data Books

Administration and Programming Guide for OS/390


Invoking Net.Data using CGI, ICAPI, or GWAPI

Regardless of the method with which you invoke Net.Data, there are two types of requests that can be specified, depending on whether you want to execute a macro, or whether you want to execute a single SQL statement, stored procedure, or function.

Macro Request
Specifies that Net.Data execute the macro specified.

Direct Request
Specifies that Net.Data execute an SQL statement, stored procedure, or function. The request specifies:

Web developers who want to write a single SQL query or call a single function such as a DB2 stored procedure, REXX program, or Perl function can issue a direct request to the database. A direct request does not have any complex Net.Data application logic that requires a Net.Data macro, and therefore bypasses the Net.Data macro processor. Direct request parameters are passed to the appropriate language environment for processing for improved performance.

Figure 3 illustrates the differences between a macro request and a direct request. A macro request always specifies a macro within the URL for the request and can also use form data. A direct request never specifies a macro within the URL, but can still use form data.

Figure 3. Macro Request Versus Direct Request



Macro Request Versus Direct Request

The syntax for invoking Net.Data when it is configured for use with ICAPI or GWAPI is the same as the syntax for invoking Net.Data when it is configured for use with CGI. For both macro and direct requests, Net.Data is invoked using a URL. The URL can be entered directly by the user, or it can be coded into the HTML page as an HTML link or an HTML form. The Web server invokes Net.Data using CGI, ICAPI, or GWAPI.

For macro requests, specify within the URL the name of the Net.Data macro and the name of the HTML block that is to be executed within the Net.Data macro. For direct requests, specify within the URL the name of the Net.Data language environment, the SQL statement or the name of the function, and any additional required parameter values. You specify these values using a syntax defined by Net.Data.

The following sections describe these invocation requests in more detail:


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