You enable macro caching by adding caching configuration variables to the Net.Data initialization file (db2www.ini). If you add the DTW_CACHE_MACRO variable, the DTW_DO_NOT_CACHE_MACRO variable, or both variables to the Net.Data initialization file, then caching is enabled. If you do not add either variable, then no macros will be cached.
If the DTW_CACHE_MACRO and DTW_DO_NOT_CACHE configuration variables both specify the same macro, then the macro is not cached by Net.Data.
The DTW_MACRO_CACHE configuration variable specifies macros that are to be cached.
Set this configuration variable in the Net.Data initialization file.
Syntax:
DTW_CACHE_MACRO [=] filename_or_pathtemplate;...
Where filename_or_pathtemplate is either:
Example 1: If you want all of the macros in /u/user1/macros and its subdirectories to be cached, set the configuration variable as follows:
DTW_CACHE_MACRO /u/user1/macros/*
Example 2: If you want to cache all macros in the DIR1 and DIR2 directories and the individual macro sql.dtw, the DTW_CACHE_MACRO path might look like this:
DTW_CACHE_MACRO /u/user1/macros/DIR1/*;/u/user2/macros/sql.dtw;/u/user2/macros/DIR2/*
The DTW_DO_NOT_CACHE_MACRO configuration variable specifies which macros are not to be cached.
Set this configuration variable in the Net.Data initialization file. If the Net.Data initialization file contains this variable, and does not contain the DTW_CACHE_MACRO variable, then all macros will be cached except for those listed in the DTW_DO_NOT_CACHE_MACRO variable.
Syntax:
DTW_DO_NOT_CACHE_MACRO [=] filename_or_pathtemplate;...
Where filename_or_pathtemplate is either:
Example 1: If you want all of your macros to be cached except the adminset.d2w macro, you would set the configuration variable as follows:
DTW_DO_NOT_CACHE_MACRO /u/user1/macros/adminset.d2w
Example 2: If both caching configuration variables are set in the initialization file, the DTW_DO_NOT_CACHE_MACRO takes precedence. For example, suppose the variable settings appear as follows:
DTW_CACHE_MACRO /u/user1/user_macros/*;/u/user1/admin_macros/* DTW_DO_NOT_CACHE_MACRO /u/user1/admin_macros/adminset.d2w
The macros in the directories user_macros and admin_macros will be cached except for the macro adminset.d2w. Even though this macro is in the admin_macros directory, it will not be cached because the setting for DTW_DO_NOT_CACHE_MACRO overrides the setting for DTW_CACHE_MACRO.