PUTENV: Assigning a Value to an Environment Variable

How to:

The PUTENV function assigns a value to an environment variable. The function returns an integer return code whose value is 1 (one) if the assignment is not successful or 0 (zero) if it is successful.

Syntax: How to Assign a Value to an Environment Variable

PUTENV(var_name, var_value)

where:

var_name

Fixed length alphanumeric

Is the name of the environment variable to be set.

var_value

Alphanumeric

Is the value you want to assign to the variable.

Example: Assigning a Value to the UNIX PS1 Variable

PUTENV assigns the value FOCUS/Shell: to the UNIX PS1 variable.

PUTENV('PS1','FOCUS/Shell:')

This causes UNIX to display the following prompt when the user issues the UNIX shell command SH:

FOCUS/Shell:

WebFOCUS

Feedback