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, 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 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 MACRO_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, Net.Data searches 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
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 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/rexxpgms.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:
%EXEC{/qsys.lib/programs.lib/rpg1.pgm %}
Net.Data would search for the file rpg1.pgm in the /qsys.lib/programs.lib directory.
%EXEC { rpg1.pgm %}
then Net.Data would attempt to find the file rpg1.pgm in the current working directory.
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 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:
%INCLUDE "/u/user1/includes/oeheader.inc
then Net.Data would search for the file oeheader.inc in the /u/user1/includes directory.
%INCLUDE "oeheader.inc"
then Net.Data would attempt to find the file oeheader.inc in the current working directory.
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.
The HTML_PATH configuration statement specifies into which directory Net.Data writes large objects (LOBs). This path statement accepts only one directory path.
The HTML_PATH must specify an IFS directory which is not in the QSYS.LIB file system.
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.
The DTW_JAVA_CLASSPATH configuration statement specifies the path used to locate Java classes. Directories are separated by colons.
Syntax:
DTW_JAVA_CLASSPATH [=] path
Example: The following example shows the DTW_JAVA_CLASSPATH statement in the initialization file.
Net.Data initialization file:
DTW_JAVA_CLASSPATH /directory1/directory2:/QIBM/ProdData/Java400