Path Configuration Statements

Net.Data determines the location of files and executable programs used by Net.Data macros from the settings of path configuration statements. The path statements are:

These path statements identify one or more directories that Net.Data searches when attempting to locate macros, executable files, text files, LOB files, and include files. The path statements that you need depend on the Net.Data capabilities that your macros use.

Update guidelines:

Some general guidelines apply to the path statements. Exceptions are noted in the description of each path statement.

The following sections describe the purpose and syntax of each path statement and provide examples of valid path statements. The examples can differ from your application, depending on your operating system and configuration.

DTW_UPLOAD_DIR

This directory configuration statement specifies where on the server to store uploaded files when a direct request containing a file type is sent by a client browser. When this variable is not set, Net.Data will not accept the files for upload.

Syntax:

DTW_UPLOAD_DIR [=] path

Example:

DTW_UPLOAD_DIR /usr/lpp/internet/server_root/pub/upload

EXEC_PATH

This path configuration statement identifies one or more directories that Net.Data searches for an external program that is invoked by the EXEC statement or an executable variable. The order of the directories in the path statement determines the order Net.Data searches for the directories. 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.

Syntax:

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

Example: The following example shows the EXEC PATH statement in the initialization file and the EXEC statement in the macro that invokes an external program.

Net.Data initialization file:

EXEC_PATH /u/user1/prgms;/usr/lpp/netdata/prgms;
 

Net.Data macro:

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

If the file myFunction.cmd is found in the /usr/lpp/netdata/prgms directory, the qualified name of the program is /usr/lpp/netdata/prgms/myFunction.cmd.

If the file is not found in the directories specified in the EXEC_PATH statement:

FFI_PATH

This path configuration statement identifies one or more directories that Net.Data searches, in the order in which they are specified, for a flat file that is referenced by a flat file interface (FFI) function.

Syntax:

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

Example: The following example shows an FFI_PATH statement in the initialization file.

Net.Data initialization file:

FFI_PATH /u/user1/ffi;/usr/lpp/netdata/ffi;

When the FFI language environment is called, Net.Data looks in the path specified in the FFI_PATH statement.

Because the FFI_PATH statement is used to provide security to those files not in directories in the path statement, there are special provisions for FFI files that are not found. See the FFI built-in functions section in Net.Data Reference.

HTML_PATH

This directory configuration statement specifies into which directory Net.Data writes large objects (LOBs). This path statement accepts only one directory path.

During installation, Net.Data creates a directory called tmplobs, under the directory specified in the HTML_PATH path configuration variable. Net.Data stores all LOB files in this directory. If you change the value of HTML_PATH, create a new subdirectory under the new directory.

Syntax:

HTML_PATH [=] path

Example: The following example shows the HTML_PATH statement in the initialization file.

Net.Data initialization file:

HTML_PATH /db2/lobs

When a query returns a LOB, Net.Data saves it in the directory specified in the HTML_PATH configuration statement.

Performance tip: Consider system limitations when using LOBs because they can quickly consume resources. See Using Large Objects for more information.

INCLUDE_PATH

This path configuration statement identifies one or more directories that Net.Data searches, in the order in which they are specified, to find a file specified on an INCLUDE statement in a Net.Data macro. When it finds the file, Net.Data appends the include file name to the path specification to produce the qualified include file name.

Syntax:

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

Example 1: The following example shows both the INCLUDE_PATH statement in the initialization file and the INCLUDE statement that specifies the include file.

Net.Data initialization file:

INCLUDE_PATH /u/user1/includes;/usr/lpp/netdata/includes

Net.Data macro:

%INCLUDE "myInclude.txt"

If the file myInclude.txt is found in the /u/user1/includes directory, the fully-qualified name of the include file is /u/user1/includes/myInclude.txt.

Example 2: The following example shows the INCLUDE_PATH statement and an INCLUDE file with a subdirectory name.

Net.Data initialization file:

INCLUDE_PATH /u/user1/includes;/usr/lpp/netdata/includes

Net.Data macro:

%INCLUDE "OE/oeheader.inc"

The include file is searched for in the directories /u/user1/includes/OE and /usr/lpp/netdata/includes/OE. If the file is found in /usr/lpp/netdata/includes/OE, the fully qualified name of the include file is /usr/lpp/netdata/includes/OE/oeheader.inc.

If the file is not found in the directories specified in the INCLUDE_PATH statement:

MACRO_PATH

This path configuration statement identifies the directories that Net.Data searches for Net.Data macros. For example, specifying the following URL requests the Net.Data macro with the path and file name /macro/sqlm.d2w:

http://server/cgi-bin/db2www/macro/sqlm.d2w/report

Syntax:

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

The equal sign (=) is optional, as indicated by brackets.

Net.Data appends the path /macro/sqlm.d2w to the paths in the MACRO_PATH configuration statement, from left to right until Net.Data finds the macro or searches all paths. See Invoking Net.Data for information on invoking Net.Data macros.

Example: The following example shows the MACRO_PATH statement in the initialization file and the related link that invokes Net.Data.

Net.Data initialization file:

MACRO_PATH /u/user1/macros;/usr/lpp/netdata/macros

HTML link:

<a href="http://server/cgi-bin/db2www/query.d2w/input">Submit another query.</a>

If the file query.d2w is found in the directory /u/user1/macros, then the fully-qualified path is /u/user1/macros/query.d2w.

If the file is not found in the directories specified in the MACRO_PATH statement:


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