IBM Books

Net.Data Administration and Programming Guide for OS/400

Path Configuration Statements

Net.Data determines the location of files and executable programs used by Net.Data macro files 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 macro files, executable files, text files, and include files. The path statements that you need depend on the Net.Data capabilities that your macros use.

Update guidelines:

Several general guidelines apply to all path statements.

Tip: Net.Data searches all specified directories, but not the subdirectories. For example, if you have Net.Data macros in the following directories, you must specify each subdirectory 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
 

The following sections describe the purpose and syntax of each path statement and provide examples of valid path statements.

MACRO_PATH

The MACRO_PATH configuration statement identifies the directories that Net.Data searches for Net.Data macro files. 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 file 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, Net.Data will search for the file in the root (/) directory. For example, if the following URL is submitted:

http://myserver/cgi-bin/db2www/myfile.txt/report
 

and the file myfile.txt was not found in any of the directories specified in MACRO_PATH, then Net.Data attempts to find the file in the root (/) directory:

/myfile.txt
 

EXEC_PATH

The EXEC_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. 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 file that invokes an external program.

Net.Data initialization file:

EXEC_PATH = /qsys.lib/programs.lib;/qsys.lib/rexx.lib/rexxpgms.file;
 

Net.Data macro:

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

If the file myFunction.mbr is found in the /qsys.lib/rexx.lib/rexxprgms.file directory, the qualified name of the program is /qsys.lib/rexx.lib/rexxpgms.file/myFunction.mbr.

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

INCLUDE_PATH

The INCLUDE_PATH configuration statement identifies one or more directories that Net.Data searches 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 fully-qualified by 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:

FFI_PATH

The FFI_PATH configuration statement identifies one or more directories that Net.Data searches 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.


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