Configuration Variable Statements

Net.Data configuration variable statements set the values of configuration variables. Configuration variables are used for various purposes. Some variables are required by a language environment to work properly or to operate in an alternate mode. Other variables control the character encoding or content of the Web page being constructed. Additionally, you can use configuration variable statements to define application-specific variables.

The configuration variables you use depend on the language environments, and databases, you are using, as well as other factors that are specific to the application.

To update the configuration variable statements:

Customize the initialization file with the configuration variables that are required for your application. A configuration variable has the following syntax:

NAME [=] value-string

The equal sign is optional, as denoted by the brackets.


The following sub-sections describe the configuration variables statements that you can specify in the initialization file:

Cache Manager Configuration Variables

Two optional configuration variables are used if the Cache Manager runs on a machine other than where the Net.Data macro runs:

If the Cache Manager runs on the local machine, UNIX-domain sockets or named pipes are used for communication and no configuration is necessary.

The Cache Manager runs on AIX and Windows NT machines, only. See Net.Data Caching to learn about Net.Data caching.

DTW_CACHE_PORT: Cache Manager Port Variable
Specifies the TCP/IP port the Cache Manager is listening on. This port number must match the port number specified in the Cache Manager configuration file, so Net.Data can communicate with the Cache Manager. If not specified, Cache Manager uses the default port 7175.

Syntax:

DTW_CACHE_PORT [=] port_number

Parameter:

port_number
A unique port number assigned to the Cache Manager to service cache requests. The default value is 7175.

Table 3 describes the options for specifying machine IDs and port numbers for these variables.

Table 3. Cache Manager Configuration Variables: Configuration Options
Default Connection Manager Values If the cache machine is specified ... If the cache machine is not specified ...
If the cache port is specified ... Net.Data connects to the Cache Manager on the specified machine using the specified port. Net.Data connects to the Cache Manager on the local machine using the specified port.
If the cache port is not specified ... Net.Data connects to the Cache Manager on the specified machine using the default port of 7175. Net.Data connects to the Cache Manager on the local machine using the default port of 7175.

DTW_CACHE_HOST: Cache Manager Machine ID Variable
Specifies the machine where the Cache Manager resides. If not specified, Net.Data assumes the correct machine is the local machine.

Syntax:

DTW_CACHE_HOST [=] host_name

Parameter:

host_name
The qualified TCP/IP host name of the local or remote machine where the Cache Manager runs. The default value is the local machine's host name.

DB2INSTANCE: DB2 Instance Variable

Specifies the instance of DB2 used by the SQL language environment. This variable value is required when Net.Data connects to DB2 running on the Windows NT, OS/2, and UNIX operating systems.

DB2 on the OS/2, Windows NT, and UNIX operating systems needs DB2INSTANCE to be defined as an environment variable. If Net.Data detects that DB2INSTANCE is not defined as an environment variable, it will set the DB2INSTANCE environment variable to the value of DB2INSTANCE found in the initialization file before attempting to connect to DB2.

Syntax:

DB2INSTANCE [=] instance_name

DTW_CM_PORT: Live Connection Port Number Variable

Specifies a unique port number that Net.Data uses for Live Connection.

Syntax:

DTW_CM_PORT [=] port_number

Where port_number specifies the unique port number used for Live Connection.

DTW_DEFAULT_ERROR_MESSAGE: Specify Generic Error Messages

Use the DTW_DEFAULT_ERROR_MESSAGE configuration variable to specify a generic error message for applications in production. This variable provides a generic message for error conditions that are not captured in any MESSAGE block.

If you still wish to see the actual error messages generated by Net.Data, use error message logging to capture the messages. See Net.Data Logging to learn about using the error log.

If the configuration variable is not specified, Net.Data displays its own provided message for the error condition.

Syntax:

DTW_DEFAULT_ERROR_MESSAGE [=] "message"

Example: Specifies a generic message

DTW_DEFAULT_ERROR_MESSAGE "This site is temporarily unavailable."

DTW_DIRECT_REQUEST: Enable Direct Request Variable

Enables or disables Net.Data direct request invocation. By default, direct request is disabled.

The direct request method of invoking Net.Data allows a user to specify the execution of an SQL statement or Perl, REXX, or C program directly within a URL. When direct request is disabled, the user must invoke Net.Data using the macro request method, allows users to execute only those SQL statements and functions defined or called in a macro. See Using Net.Data Mechanisms for security-related recommendations when using DTW_DIRECT_REQUEST.

Syntax:

DTW_DIRECT_REQUEST [=] YES|NO

Where:

YES
Enables Net.Data direct request.

NO
Disables Net.Data direct request. NO is the default.

DTW_INST_DIR: Net.Data Installation Directory Variable

Locates certain files during Net.Data execution. You set this variable at installation time to specify the home directory, <inst_dir>, where Net.Data is installed. Do not change this value after installation.

DTW_LOG_DIR and DTW_LOG_LEVEL: Error Log Variables

DTW_LOG_DIR specifies the directory where the error logs are stored. Logging will not occur unless both this variable and the DTW_LOG_LEVEL variable are set.

See Logging Net.Data Error Messages to learn more about these variables and logging error messages with Net.Data.

Syntax:

DTW_LOG_DIR [=] \inst_dir\path
 

Example: Initialization file configuration

DTW_LOG_DIR \inst_dir\mylogfiles\
 

DTW_LOG_LEVEL: Error Log Level Variable

DTW_LOG_LEVEL specifies the level of errors to be recorded in the error logs. Logging will not occur unless both this variable and the DTW_LOG_DIR variable are set.

See Logging Net.Data Error Messages to learn more about these variables and logging error messages with Net.Data.

Syntax:

DTW_LOG_LEVEL [=] off|warning|error

Example: Initialization file configuration

DTW_LOG_LEVEL error

DTW_MBMODE: Native Language Support Variable

Activates national language support for word and string functions. When the value of this variable is YES, all string and word functions correctly process MBCS characters within strings by treating strings as mixed data (that is, as strings that potentially contain characters from both single-byte character sets and double byte character sets). The default value is NO. You can override the value set in the initialization file by setting the DTW_MBMODE variable in a Net.Data macro.

This configuration variable works with the DTW_UNICODE configuration variable. If DTW_UNICODE uses the default value of NO, the value of DTW_MBMODE is used. If DTW_UNICODE is set to a value other than NO, its value is used. Table 4 illustrates how the settings of these two variables determine how built-in functions process strings:

Table 4. Relationship Between the Settings of DTW_UNICODE and DTW_MBMODE
If DTW_UNICODE is set to If DTW_MBMODE=YES If DTW_MBMODE=NO
NO Supports MBCS mixed with SBCS Supports SBCS only
UTF8 Supports UTF-8 Supports UTF-8

Syntax:

DTW_MBMODE [=] NO|YES

DTW_REMOVE_WS: Variable for Removing Extra White Space

When this variable is set to YES, Net.Data removes extraenneous white space from the HTML output. By compressing white space, this variable reduces the amount of data sent to the Web browser, thereby improving performance. The default is NO.

You can override this variable in the macro by using the DEFINE statement.

Tip: Do not set DTW_REMOVE_WS to YES if you are using DTW_PRINT_HEADER to generate your own headers (DTW_PRINT_HEADER "NO").

Syntax:

DTW_REMOVE_WS [=] YES|NO

DTW_SHOWSQL: Enable or Disable SHOWSQL Configuration Variable

Overrides the effect of setting SHOWSQL within your Net.Data macros.

Syntax:

DTW_SHOWSQL [=] YES|NO

Where:

YES
Enables SHOWSQL in any macro that sets the value of SHOWSQL to YES.

NO
Disables SHOWSQL in your macros, even if the variable SHOWSQL is set to YES. NO is the default.

Table 5 describes how the settings in the Net.Data initialization file and the macro determine whether the SHOWSQL variable is enabled or disabled for a particular macro.

Table 5. The Relationship Between Settings in the Net.Data Initialization File and the Macro for SHOWSQL
Setting of DTW_SHOWSQL Setting SHOWSQL SQL statement is displayed
NO NO NO
NO YES NO
YES NO NO
YES YES YES

DTW_SMTP_SERVER: E-mail SMTP Server Variable

Specifies the SMTP server to use for sending out e-mail messages using the DTW_SENDMAIL built-in function. The value of this variable can either be a host name or an IP address. If this variable is not set, Net.Data uses the local host as the SMTP server.

Syntax:

DTW_SMTP_SERVER [=] server_name

Where server_name is the host name or IP address of the the SMTP server that is to be used for sending e-mail messages.

Performance tip: Specify an IP address for this value to prevent Net.Data from connecting to a domain name server when retrieving the IP address of the specified SMTP server.

Example:

DTW_SMTP_SERVER us.ibm.com

DTW_UNICODE: Unicode Variable

Specifies whether Net.Data supports Unicode in:

Net.Data supports UTF-8 Unicode format in macros, form data, and built-in functions, and the output is always in UTF-8. Net.Data can access a database that contains UTF-16 data and convert it to UTF-8.

When set to UTF8, DTW_UNICODE tells Net.Data to run in a Unicode environment. Net.Data then generates pages in UTF-8 and expects any input data to be in UTF-8 format (or in the case of DB2 database data, UCS-2 is accepted). The input data includes the content of the macro file, the form data sent from the browser, and all other data coming from external data sources.

DB2 Unicode database requirement: In addition to setting the DTW_UNICODE variable, also set the DB2-specific environment variable, DB2CODEPAGE, to 1208 in the environment in which Net.Data runs. For example, for the Apache Web server, add the following line to the HTTPD.CONF file:

SetEnv DB2CODEPAGE 1208

See your Web server documentation to determine how to set environment variables for CGI scripts, Web server APIs, Fast-CGI programs, or servlets.

Net.Data uses the English message catalog when running in a Unicode environment.

The DTW_UNICODE configuration variable works with the DTW_MBMODE configuration variable. The value of the DTW_UNICODE configuration variable overrides the setting of the DTW_MBMODE variable when processing word and string built-in functions. But, if DTW_UNICODE is set to NO or is not set, then the value of DTW_MBMODE is used. Table 4 illustrates how the settings of these two variables determine how built-in functions process strings:

Syntax:

DTW_UNICODE [=] NO|UTF8

Where:

NO
Specifies to defer to the value of the DTW_MBMODE variable. Table 4 describes Net.Data support based on the value of DTW_MBMODE.

UTF8
Specifies to support UTF-8 code page and ignore the value of the DTW_MBMODE configuration variable. UTF-8 represents characters by a variable number of bytes and is ASCII safe.

DTW_VARIABLE_SCOPE: Variable Scope Variable

Specifies how Net.Data treats local variable scope: whether local variables remain local or whether local variables can be used outside the function block in which they were created. This variable is provided for backward compatibility with previous versions of Net.Data and is not available with OS/390 or OS/400 versions of Net.Data.

Syntax:

DTW_VARIABLE_SCOPE = LOCAL|GLOBAL

Where:

LOCAL
Specifies that local variables remain local. This behavior was introduced with Net.Data Version 2.0 and is the default.

GLOBAL
Specifies that local variables can be used outside the function block they were created in. It is provided for backward compatibility with earlier versions of Net.Data; LOCAL is the recommended setting.


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