During the time I worked support in the Windows world I made use of system variables often. It was nothing to set a system variable to represent a particular status. This would be readable no matter what user account would be logged in.
Up to now I don't recall having a need to do this in the Mac world but now I'd like to. In delving into this thus far there doesn't seem to be anything simple to it. I'm reading about differences between OS's in how to do it and a few different commands used for it. I'm seeing set, setenv, export, and then launchctl with it's own syntax.
What am I missing besides more time to study this stuff? I would have thought this would be pretty straight forward in a unix like environment. All I need is to set a variable globally so that it can be read by any user logged into the system both before and after restart of the computer. The OS's I'm targeting for this is Yosemite, El Capitan, and Sierra. Any help would be appreciated.