DM_setEnv

This procedure sets environment variables that are used by Intelligent Miner® in the running agent process. It also sets the model cache size.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-DM_setEnv--(--variable--,--value--)-------------------------><

Parameters

variable
The name of the variable to be defined. The variable is of type VARCHAR.
value
The value of the variable, for example, an absolute path name, of type VARCHAR.

Return value

The procedure checks that the variable name has the prefix IDM_. This ensures that you change only variables specific to Intelligent Miner.

If value is NULL, the variable with the name variable is removed from the environment of the process.

Note: DM_setEnv and DM_getEnv are intended to set environment variables in the DB2® db2fmp process. The database must be enabled in fenced mode. If the database is enabled in unfenced mode, calling these procedures might not have the intended effect.

Examples

The following call sets the name and directory of the error file:
CALL IDMMX.DM_setEnv('IDM_MX_ERRORFILE', '/tmp/myerrors.log')
The error file is set to its default value:
CALL IDMMX.DM_setEnv('IDM_MX_ERRORFILE', NULL)

Cached models can be of type pinned or unpinned. The variable IDM_MX_MAX_OPEN_MODELS controls the number of unpinned models in the cache only. Models implicitly loaded into the cache using an apply UDF are always unpinned. They can be removed from the cache at any time if a new model needs cache space. Pinned models must be explicitly inserted into and removed from the cache. For more information refer to the function DM_openModel.

With this call, you can store three models in the cache:
CALL IDMMX.DM_setEnv( 'IDM_MX_MAX_OPEN_MODELS', '3');   
With this call, the models are not stored in the cache:
CALL IDMMX.DM_setEnv( 'IDM_MX_MAX_OPEN_MODELS', '0');


Feedback | Information roadmap