To find out which host command environment is currently active, use the ADDRESS built-in function.
curenv = ADDRESS()
In this example, curenv is set to the active host command environment, for example, REXXCICS.