Net.Data Books

Administration and Programming Guide for OS/390

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 DB2 subsystems, 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:

Configuration variable assumptions: The sample Net.Data initialization file makes several assumptions about customizing the setting of Net.Data configuration variables. These assumptions may not be correct for your environment:

DB2MSGS: DB2 Message Text Variable

Specifies whether Net.Data loads DB2-provided message text for SQLCODES when using the SQL language environment to access DB2 for OS/390.

This variable does not affect MESSAGE blocks.

Syntax:

DB2MSGS [=] message_level

Where message_level indicates the level of DB2-provided messages that Net.Data displays. message_level can be set to the following values:

NONE
Specifies that Net.Data displays no message text.

ERRORONLY
Specifies that Net.Data displays message text only for negative SQLCODE values

ALL
Specifies that Net.Data displays message text for all SQLCODE values. This is the default. If a value is provided for DB2MSGS other than one of the valid values listed above, Net.Data uses the default value of ALL.

Performance tip: When the display of DB2 message text at the browser is not required, specifying NONE can improve performance. When the display of DB2 warning message text at the browser is not required, specifying ERRORONLY can improve performance.

DB2PLAN: DB2 Plan Variable

Specifies the default DB2 plan to be used by the SQL language environment when accessing DB2 for OS/390.

Syntax:

DB2PLAN [=] plan_name

Example: Sets the default DB2 plan name

DB2PLAN DTWGAV22

To override the initialization file setting in the macro:

  1. Add the DB2PLAN variable as a parameter of the DTW_SQL ENVIRONMENT statement in initialization file as shown in the following example:
    ENVIRONMENT (DTW_SQL) dtwsql (IN DB2PLAN)
    
  2. In the macro, set the variable DB2PLAN to the value required for the application.

DB2SSID: DB2 Subsystem ID Variable

Specifies the default DB2 subsystem ID used by the SQL language environment when accessing DB2 for OS/390.

Syntax:

DBS2SSID [=] subsystem_id

Example: Sets the default DB2 subsystem ID

DB2SSID DBNC

To override the initialization file setting in the macro:

  1. Add the DB2SSID variable as a parameter of the DTW_SQL ENVIRONMENT statement in initialization file as shown in the following example:
    ENVIRONMENT (DTW_SQL) dtwsql (IN DB2SSID)
    
  2. In the macro, set the variable DB2SSID to the value required for the application.

DefaultDBCp: Default Database Code Page Variable

Specifies the default code page that Net.Data uses when accessing database data. Net.Data uses the setting of this variable to:

The Web server's configuration file (/etc/httpd.conf) specifies the default code page environment through DefaultFsCp and DefaultNetCp directives. The DefaultFsCp directive specifies the default file system code page on the server. This code page is the EBCDIC code page in which the Web server expects to receive text streams from Net.Data. The DefaultNetCp directive specifies the default network code page. This code page is the ASCII code page used to encode text streams that are served by the Web server.

Performance tip: Do not configure the code page variable DefaultDBCp unless your application requires it. When you define this variable, Net.Data assumes a special conversion is necessary.

If DefaultDBCp is not specified within the initialization file, then Net.Data assumes that the code page for the data in the database is equivalent to the default file system code page and no conversions take place.

Syntax:

DefaultDBCp [=] code_page

DSNAOINI: DB2 CLI Initialization File Variable

Specifies the name of the DB2 CLI initialization file. The value of this configuration variable can either be a sequential dataset or a member of a partitioned dataset.

If you want to use the Net.Data ODBC language environment, use this variable to specify the name of your DB2 CLI initialization file. If you plan to use the ODBC language environment with ICAPI, set the MVSATTACHTYPE variable in the DB2 CLI initialization file to RRSAF. Also, set the PLANNAME variable to the same plan name as the one specified by DB2PLAN.

Syntax:

DSNAOINI [=] CLI_initialization_file_name

Example 1: A sequential dataset CLI initialization file name

DSNAOINI DBNC.DSNAOINI

Example 2:

DSNAOINI DBNC.CLI(DSNAOINI)

DTW_CACHE_MACRO: Caching of Macros

Specifies macros that are to be cached by Net.Data. This variable works with the DTW_DO_NOT_CACHE_MACRO configuration variable. See Net.Data Caching of Macros for more information on using these configuration variables.

DTW_CACHE_MANAGEMENT_INTERVAL: Frequency of Web Page Caching

Sets how often automatic web page caching should occur. See Configuring Net.Data to Automatically Manage Cached Web Pages and Large Objects for more information on using this configuration variable.

Syntax:

DTW_CACHE_MANAGEMENT_INTERVAL [=] seconds

DTW_CACHE_PAGE: Caching of Web Pages

Specifies pages that are to be cached by Net.Data. See Dynamic Web Page Caching for more information on using this configuration variable.

Syntax:

DTW_CACHE_PAGE file_name_spec|path_template_spec lifetime usage_scope 

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 Error Log 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_DO_NOT_CACHE_MACRO: Caching of Macros

Specifies macros that are not to be cached by Net.Data; all other macros are cached. This variable works with the DTW_CACHE_MACRO configuration variable. See Net.Data Caching of Macros for more information on using these directives.

DTW_ERROR_LOG_DIR: Location of Error Log

Sets the directory where the error log is stored. See Setting the Error Log File Directory for more information on using this configuration variable.

Syntax:

DTW_ERROR_LOG_DIR [=] full_directory_path

DTW_ERROR_LOG_LEVEL: Level of Error to Log

Sets the level of error logging. See Setting the Level of Error Logging for more information on using this configuration variable.

Syntax:

DTW_ERROR_LOG_LEVEL [=] OFF|INFORMATION|ALL

DTW_LOB_LIFETIME: Length of Time LOBs Are Available

Sets how long LOB files are to be available on the filesystem. See Configuring Net.Data to Automatically Manage Cached Web Pages and Large Objects for more information on using this configuration variable.

Syntax:

DTW_LOB_LIFETIME [=] seconds

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 DBCS 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.

Syntax:

DTW_MBMODE [=] NO|YES

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

DTW_REMOVE_WS: Variable for Removing Extra White Space

Reduces the size of a dynamically generated Web page by removing superfluous white space consisting of tabulators, blanks, and new-line characters. When this variable is set to YES, Net.Data compresses a sequence of two or more white spaces to one new-line character, generating shorter HTML result pages. 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: Defining this variable to YES affects the amount and type of white space that is displayed. Although the browser ignores extra white space in most cases, it is advised that this variable should be set to NO (or left undefined) for any macros that make use of <PRE></PRE> tags or those that set DTW_PRINT_HEADER to NO, as the resulting page might display differently.

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 1 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 1. 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 be the name of the SMTP server if it is on the local system, or it can be the node and name of the SMTP server if it is on a remote system. If this variable is not set, Net.Data uses the value SMTP as the name of the server and assumes it is on the local system.

Syntax:

DTW_SMTP_SERVER server_name

Where server_name is one of the following values:

name
Specifies the name of the SMTP server running on the local system. The default name is SMTP.

node.name
Specifies the node and name on which the SMTP server is running.

Example:

DTW_SMTP_SERVER mynode.myserver

DTW_TRACE_LOG_DIR: Location of Trace File

Sets the directory where the trace log is stored. See Setting the Trace Log Directory for more information on using this configuration variable.

Syntax:

DTW_TRACE_LOG_DIR [=] full_directory_path

DTW_TRACE_LOG_LEVEL: Level of Trace to Log

Sets the level of trace logging. See Setting the Level of Trace Logging for more information on using this configuration variable.

Syntax:

DTW_TRACE_LOG_LEVEL [=] OFF|APPLICATION|SERVICE


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