IBM Books

Administration and Programming Guide for OS/400

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 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:

DTW_MACRO_CACHE_SIZE: Macro Cache Size Variable

Indicates the memory size in megabytes that Net.Data should use when caching macros. When the cache size is exceeded, Net.Data removes old cached macros to make room in the cache. Net.Data removes the macros that have been used the least recently.

Syntax:

DTW_MACRO_CACHE_SIZE [=] size

Where:

size
Specifies the cache memory size in number of megabytes. The default is 5 MB and caching is always enabled. If size is 0, no macros are cached. If size is 1 - 4, the default of 5 is used.

Example: Specifies a cache size of 16 MB.

DTW_MACRO_CACHE_SIZE 16

DTW_PAD_PGM_PARMS: Parameter Padding Configuration Variable

Indicates to a language environment whether character parameters that are to be passed to a program or stored procedure are padded with blanks. Character parameters have a data type of CHARACTER or CHAR.

For IN or INOUT parameters, if the length of parameter value is less than the specified precision, blanks are inserted to the right of the parameter value until the length of the parameter value is the same as the precision.

For OUT parameters, the parameter value is set to precision blanks.

After the call to the program or stored procedure, all trailing blanks are removed from OUT and INOUT parameter values.

Set this variable in the Net.Data initialization file to specify a value for all of your macros. You can override the value by defining it in the macro. If DTW_PAD_PGM_PARMS is not defined in the macro, it uses the value in the initialization file.

DTW_PAD_PGM_PARMS is supported by the Direct Call and SQL language environments.

Syntax:

DTW_PAD_PGM_PARMS [=] YES|NO

Where:

YES
Specifies that all IN and INOUT character parameter values are left justified and padded with blanks for the defined precision of the parameter before passing the parameters to a program or stored procedure. Trailing blanks are removed after the call to a program or stored procedure.

NO
Specifies that no padding is added to character parameter values (values are NULL-terminated) when passing parameters to programs or stored procedures. Trailing blanks are not removed after calling a program or stored procedure. This is the default.

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_CCSID: E-mail SMTP CCSID Variable

Specifies the ASCII coded character set identifier (CCSID) associated with the Multi-purpose Internet Mail Extensions (MIME) character set specified in DTW_SMTP_CHARSET. The CCSID is to be used when translating data specified on the DTW_SENDMAIL function from EBCDIC to ASCII.

If DTW_SMTP_CCSID is specified, you must also specify DTW_SMTP_CHARSET. When specifying the CCSID, ensure that it is appropriate for the MIME character set specified in DTW_SMTP_CHARSET and that the CCSID is supported by the system. Table 2 lists common MIME character sets and the associated ASCII CCSID. If DTW_SMTP_CCSID is not set, Net.Data uses the CCSID associated with MIME character set ISO-8859-1, which is 819.

Syntax:

DTW_SMTP_CCSID [=] ascii_ccsid

where ascii_ccsid is the ASCII CCSID (a number between 1-65534) to be used when translating from EBCDIC to ASCII.

Example:

DTW_SMTP_CCSID 912

This ASCII CCSID corresponds to the MIME character set ISO-8859-2

DTW_SMTP_CHARSET: E-mail SMTP Character Set Variable

Specifies the Multi-purpose Internet Mail Extensions (MIME) character set that is to be used in the e-mail messages by the DTW_SENDMAIL function. If DTW_SMTP_CHARSET is specified, you must also specify DTW_SMTP_CCSID. When specifying the MIME character set, ensure that the character set is valid because Net.Data does not validate the value specified for this variable. If DTW_SMTP_CHARSET is not set, Net.Data uses the MIME character set ISO-8859-1, with the associated CCSID of 819.

Table 2 lists common MIME character sets and the associated ASCII CCSID.


Table 2. Character sets supported by Net.Data

MIME Standard Character Set ASCII CCSID Description
US-ASCII 367 US English
ISO-2022-JP 5052 Japan MBCS
ISO-8859-1 819 Latin-1
ISO-8859-2 912 Latin-2
ISO-8859-5 915 Cyrillic
ISO-8859-6 1089 Arabic
ISO-8859-7 813 Greek
ISO-8859-8 916 Hebrew
ISO-8859-9 920 Latin-5

Syntax:

DTW_SMTP_CHARSET character_set

Where character_set is the MIME character set to be used.

Example:

DTW_SMTP_CHARSET iso-8859-2

This MIME character set corresponds to the 912 ASCII CCSID.

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 9.5.34.5

DTW_SQL_ISOLATION: DB2 Isolation Variable

The DTW_SQL language environment uses the DTW_SQL_ISOLATION configuration statement to determine the degree to which the database operations executed by the DTW_SQL language environment are isolated from concurrently executing processes.

Syntax:

DTW_SQL_ISOLATION locking_method

Where locking_method is one of the following values:

DTW_SQL_NO_COMMIT
Specifies not to use commitment control. For the OS/400 operating system, do not specify this value if a relational database is specified in the relational database directory and the relational database is on a non-OS/400 system.

DTW_SQL_READ_UNCOMMITTED
Specifies locking for the objects referred to in SQL ALTER, COMMENT ON, CREATE, DROP, GRANT, LABEL ON, and REVOKE statements and the rows updated, deleted, and inserted. The objects are locked until the end of the unit of work (transaction). Uncommitted changes in other processes can be seen.

DTW_SQL_READ_COMMITTED
Specifies locking for the objects referred to in SQL ALTER, COMMENT ON, CREATE, DROP, GRANT, LABEL ON, and REVOKE statements and the rows updated, deleted, and inserted. The objects are locked until the end of the unit of work (transaction). A row that is selected, but not updated, is locked until the next row is selected. Uncommitted changes in other processes cannot be seen.

DTW_SQL_REPEATABLE_READ
Specifies locking for the objects referred to in SQL ALTER, COMMENT ON, CREATE, DROP, GRANT, LABEL ON, and REVOKE statements and the rows selected, updated, deleted, and inserted. The objects are locked until the end of the unit of work (transaction). Uncommitted changes in other processes cannot be seen.

DTW_SQL_SERIALIZABLE
Specifies locking for the objects referred to in SQL ALTER, COMMENT ON, CREATE, DROP, GRANT, LABEL ON, and REVOKE statements and the rows selected, updated, deleted, and inserted. The objects are locked until the end of the unit of work (transaction). Uncommitted changes in other processes cannot be seen. All tables referred to in SELECT, UPDATE, DELETE, and INSERT statements are locked exclusively until the end of the unit of work (transaction).

DTW_SQL_NAMING_MODE: SQL Table Naming Variable

The DTW_SQL_NAMING_MODE configuration statement specifies how a table name can be specified in an SQL statement.

Syntax:

DTW_SQL_NAMING_MODE mode

Where mode is one of the following values:

SQL_NAMING
Specifies that tables are qualified by the collection name in the form:
collection.table

where collection is the name of the collection and table is the table name. The default qualifier is the user ID running the process that executes the SQL statement and is used when the table name is not explicitly qualified and the default collection name is not specified. SQL_NAMING is the default table name.

SYSTEM_NAMING
Specifies that files are qualified by library name in the form:
library/file

where library is the name of the library and file is the table name. The default search path is the library list (*LIBL) for the unqualified table name, if the table name (file) is not explicitly qualified and a default collection name (library) is not specified.

DTWR_CLOSE_REGISTRIES: Open Web Registry Variable

Specifies whether to close or keep a Web registry open. This variable lets you keep the Web registry open so that subsequent invocations of Net.Data macros that access the same Registry do not have to reopen the registry.

Syntax:

DTWR_CLOSE_REGISTRIES YES|NO

Where:

YES
Specifies to close all open Web registries after a Net.Data macro has been processed.

NO
Specifies to leave all open Web registries open after a Net.Data macro has been processed. NO is the default.

Performance tip: You can use the DTWR_CLOSE_REGISTRIES configuration statement to improve the performance of accessing a Web registry (with the Web registry built-in functions) by minimizing the opening and closing of registries. If the registry can be accessed by multiple processes at the same time (as in the case with simultaneous browser request), set DTWR_CLOSE_REGISTRIES to YES.


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