Similar to on a Windows or Linux computer, environment variables can be configured within Cisco IOS Embedded Event Manager (EEM) and used within EEM applets. This can benefit network administrators by needing to define constants only once, such as the IP address of an SMTP server to be used for email alerting, instead of needing to define this multiple times across multiple applets.
The environment variables presently configured on a device can be viewed from a privileged EXEC session with the command show event manager environment all.
To create a new environment variable, enter global configuration mode and use command event manager environment <name> <value>.
There are a number of built-in environment variables pre-existing within EEM. Refer to Cisco's documentation for a list of built-in variables for your device and IOS version and take care to choose a unique variable name.
If you once again issue the command show event manager environment all you will see your newly-created variable listed.