If the SAS execution behavior is not as documented/expected, suggest you contact SAS tech support for further assistance. Useful DOC references specific to the SAS UNIX companion guide are provided below.
I don't know the correct terminology but I think the problem is that when you run a SAS program it spawns another environment that inherits all the variables from the original. I can create new variables and modify existing variables but I have been unable to have an effect on the original environment.
If the program that modifies or creates the environment variables starts the second program using SYSTASK perhaps then the variables created by program 1 are available.