is a local environment variable name. The environment_variable may not contain embedded spaces. If the environment_variable does not already exist, it is created.

value

the value assigned to environment_variable.

environment_variable and value may be TN3270 Plus variables.

The SetEnv command sets the value of a local environment variable. The local environment variable value is then accessible by other TN3270 Plus scripts. This makes it easy to pass information from one script to another. To access the value of a local environment variable, enclose the variable name in percent signs. Local environment variables persist until TN3270 Plus is closed.

Examples

SetEnv(PartNumber,78654)

SetEnv(Description,"Widget Maker")

SetEnv(RetailPrice,28.95)

MsgBox(%PartNumber%)

Sample Scripts

The first sample script assigns a value to a local environment variable.
The second sample script displays the value of the local environment variable in a message box.