Types of Invocation Requests

Regardless of the method with which you invoke Net.Data, there are two types of requests that can be specified.

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

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

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 18 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 18. Macro Request Versus Direct Request


Macro Request Versus Direct Request

The syntax for invoking Net.Data depends on how Net.Data is configured and the type of request that you make. 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, FastCGI, or one of the Web server APIs. Additionally, you can invoke Net.Data using Net.Data servlets.

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:

Although the examples specify the syntax to use when invoking Net.Data using CGI, the concepts apply to all interfaces that are used to invoke Net.Data. For the exact syntax required for each type of interface, refer to the section specific to each.


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