IBM Books

Net.Data Programming Guide


Path Statements

Net.Data recognizes these path statements to find files required to process Net.Data macros:

These path statements, with the exception of HTML_PATH, identify a set of directories that are searched by Net.Data for macro files, executable files, flat files, and include files. Each directory specified is delimited by a semicolon (;). Forward slashes (/) and back slashes (\) are treated the same. The multiple-path capability lets you organize your files and isolate your Web applications in their own directories.

The directories specified are searched, but not the subdirectories. For example, if you have Net.Data macros in these directories, you must specify each in the path statement:

usr/test/client
usr/test/assoc
usr/test/partner

Your MACRO_PATH statement might look like this:

MACRO_PATH = usr/test/client;usr/test/assoc;usr/test/partner
 

Examples in the following sections discussing Net.Data configuration contain path specifications that might be different depending on your platform and configuration.

MACRO_PATH

The syntax of the MACRO_PATH statement is similar to other path statements:

MACRO_PATH [=] path1;path2;...;pathn

The equals sign (=) is optional, as indicated by brackets. The MACRO_PATH statement identifies one or more directories to search, in the order in which they are specified, for a Net.Data macro file. For example, sending the following URL requests the Net.Data macro with the path and file name/WWW/macro/sqlm.mac:

http://hostname/cgi-bin/db2www/WWW/macro/sqlm.mac/report

Net.Data appends the path /WWW/macro to the paths in the MACRO_PATH configuration statement, from left to right until the Net.Data macro is found or all paths are searched. See "Invoking Net.Data" for information on invoking Net.Data macros.

Example:

Net.Data initialization file:

MACRO_PATH = ../macro;product1/macro

HTML anchor reference:

<A HREF="cgi-bin/db2www/query.mac/input">Submit another query.</A>

If query.mac is found in the../macro directory, the qualified name of the Net.Data macro is /WWW/macro/query.mac.

EXEC_PATH

The format of EXEC_PATH is similar to MACRO_PATH:

EXEC_PATH [=] path1;path2;...;pathn

The EXEC_PATH statement identifies one or more directories to search in the order they are specified for an external program, which is invoked by the EXEC statement. If the program is found, the external program name is appended to the path specification resulting in a fully-qualified file name that is passed to the language environment for execution.

Example 1:

Net.Data initialization file:

EXEC_PATH = ../pgms;product1/pgms;product2/pgms

Net.Data macro:

%FUNCTION(DTW_REXX) myFunction() {
  %EXEC{ "myFunction.cmd" %}
%}

If Net.Data is run from the directory /www/cgi-bin and the file myfunction.cmd is found in the product1/pgms directory, the qualified name of the program is /www/cgi-bin/product1/pgms/myfunction.cmd.

See Net.Data Reference Guide for more information.

INCLUDE_PATH

The format of INCLUDE_PATH is similar to MACRO_PATH:

INCLUDE_PATH [=] path1;path2;...;pathn

The INCLUDE_PATH identifies one or more directories which are searched in the order in which they are specified, to find a file specified on the INCLUDE statement in a Net.Data macro. When found, the include file name is appended to the path specification to produce the qualified include file name.

Example 1:

Net.Data initialization file:

INCLUDE_PATH = ../macro;product1/macro

Net.Data macro:

%INCLUDE "myInclude.txt"

If Net.Data is run from the directory /WWW/cgi-bin and myinclude.txt is found in the ../macro directory, the qualified name of the include file is /WWW/macro/myinclude.txt.

Example 2:

Net.Data initialization file:

INCLUDE_PATH = ../INCLUDES

Net.Data macro:

%INCLUDE "OE/oeheader.inc"

If Net.Data is run from the directory /www/cgi-bin, the include file is searched for in the directory /WWW/INCLUDES/OE, and the qualified name of the include file is /WWW/INCLUDES/OE/oeheader.inc.

FFI_PATH

The format of FFI_PATH is similar to MACRO_PATH:

FFI_PATH [=] path1;path2;...;pathn

The FFI_PATH statement identifies one or more directories to search, in the order in which they are specified, for a flat file used with a flat file interface (FFI) function.

Example:

Net.Data initialization file:

FFI_PATH = pub/ffi;pub/ffi/data

When the FFI language environment is called, it looks in the path specified here.

HTML_PATH

The format of HTML_PATH is similar to MACRO_PATH:

HTML_PATH [=] path1;path2;...;pathn

Example:

Net.Data initialization file:

HTML_PATH = pub/www/htm

When a query returns a large object (LOB), Net.Data saves it in the directory specified in the HTML_PATH configuration variable. Consider system limitations when using LOBs because they can quickly consume resources. See "Using Large Objects" for more information.


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