Regardless of what language one is using: at a plain mechanical API level--from a child process--it's not possible to set environment variables in the parent process:
https://stackoverflow.com/a/263068/211160
You can use SET-ENV to set the variables in the calling process, and the child process created by CALL will inherit them. In R3-Alpha on Linux:
>> set-env "FOO" "10"
>> call "echo $FOO"
10
== none
In Red on Windows:
>> set-env "FOO" "10"
>> call/shell/output "echo %FOO%" out: ""
== 0
>> out
== "10^/"
If you want environment variables to persist between child process calls, you could rig some protocol up where the child process returns information to the parent, that lets it make the SET-ENV modification for the next CALL to inherit.