DTW_SETENV

AIX HP-UX Linux OS/2 OS/390 OS/400 PTX SUN Win NT
X X X X X X X X X

Purpose

Assigns an environment variable with a specified value and returns the previous value.

Format

@DTW_SETENV(envVarName, envVarValue, prevValue)

@DTW_rSETENV(envVarName, envVarValue)

Parameters

Table 51. DTW_SETENV Parameters
Data Type Parameter Use Description
string envVarName IN A variable or literal string representing the environment variable.
string envVarValue IN A variable or literal string with the value to which the environment variable is assigned.
string prevValue OUT A variable that contains the previous value of the environment variable.

Return Codes

Table 52. DTW_SETENV Return Codes
Return Code Explanation
-1001 The server could not process a Net.Data request to allocate memory.
1001 An input parameter contained a NULL value.
1003 An incorrect number of parameters were passed on a function call.
1005 A parameter passed on a function call, required to be a string variable, was of a different variable type.
1006 A literal string was passed on a function call for a parameter which was required to be an output parameter.

Usage Notes

If no previous value for the environment variable is found, an empty string is returned.

Examples

Example 1: Returns the value for the previous path

@DTW_SETENV("PATH", "myPath", prevValue)

Example 2: Returns the value for the previous path and assigns the value for PATH value

@DTW_rSETENV("PATH", "myPath")


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