IBM Books

Net.Data Language Environment Guide


Configuring a Language Environment

Several language environments are preconfigured in the Net.Data initialization file, DB2WWW.INI. Each language environment has an ENVIRONMENT statement in the initialization file that contains information specific to that language environment. An ENVIRONMENT statement has this format:

ENVIRONMENT(type) library-name([usage parameter, ...])
The following example shows ENVIRONMENT statements for language environments supplied by Net.Data. These examples illustrate all the parameters that you can specify. The variables you include in the ENVIRONMENT statements are ones which you want to allow Net.Data macro writers to set or override in their macros. Language environment statements in the initialization file are also used for Net.Data built-in functions. See the platform specific information in the appendixes in Net.Data Reference Guide or in your Net.Data README file or Program Directory for additional examples.
ENVIRONMENT (DTW_SQL)      DTWSQL    ( IN DATABASE, LOGIN, PASSWORD, 
TRANSACTION_SCOPE, SHOWSQL, ALIGN, START_ROW_NUM)
ENVIRONMENT (DTW_SYB)      DTWSYB    ( IN DATABASE, LOGIN, PASSWORD, 
TRANSACTION_SCOPE, SHOWSQL, ALIGN, START_ROW_NUM)
ENVIRONMENT (DTW_ODBC)     DTWODBC   ( IN DATABASE, LOGIN, PASSWORD, 
TRANSACTION_SCOPE, SHOWSQL, ALIGN)
ENVIRONMENT (DTW_APPLET)   DTWJAVA   ( )
ENVIRONMENT (DTW_JAVAPPS)   ( OUT RETURN_CODE ) CLIETTE "DTW_JAVAPPS"
ENVIRONMENT (DTW_PERL)     DTWPERL   ( OUT RETURN_CODE )
ENVIRONMENT (DTW_REXX)     DTWREXX   ( OUT RETURN_CODE )
ENVIRONMENT (DTW_SYSTEM)   DTWSYS    ( OUT RETURN_CODE )

OS/390 differs slightly for SQL and ODBC access:

ENVIRONMENT (DTW_SQL)      DTWSQL    ( IN LOCATION, DB2SSID, DB2PLAN,
TRANSACTION_SCOPE, ALIGN)
 
ENVIRONMENT (DTW_ODBC)     DTWODBC   ( IN LOCATION, TRANSACTION_SCOPE, ALIGN)

These are the parameters you must specify for each language environment:

The configuration information is read when Net.Data starts, but a language environment DLL or shared library is not loaded until a FUNCTION block identifying that language environment is called. The DLL remains loaded until Net.Data ends.

Each ENVIRONMENT statement must be on a single line. The language environment can retrieve the value of a configuration variable with the dtw_getvar() routine, and can modify the value using the dtw_setvar() routine. See details in dtw_getvar() and dtw_setvar().

Language environments might require additional configuration information. You can specify the information in the Net.Data initialization file by configuration variable statements. These statements have this form:

NAME [=] value-string

For example:

DB2INSTANCE = DB2


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