For the z/OS shell
- The RACF® user profile.
- The /etc/profile file, which is a system-wide file that sets environment variables for all z/OS shell users. This file is only run for login shells.
- The $HOME/.profile file, which sets environment variables for individual users. This file is only run for login shells.
- The file named in the ENV environment variable. This file is run for both login shells and subshells.
- A shell command or shell script.
Later settings take precedence. For example, the values set in $HOME/.profile override those in /etc/profile.
Depending on the commands used to set it, an environment variable can be local (used only for the current process) or exported (used for the current process and for any other processes spawned by the current process).