The following is an RPG example of how to retrieve environment variables:
Environment variables set by Profound UI include:
PROFOUNDUI = Always set to '1' if running in the Profound UI session controller.
PUI_LANG = language ID that Profound UI is using (see International Language Support (Translations) for details)
Environment variables set in the HTTP server configuration using the SetEnv directive are also available, as are the environment variables set by the HTTP server. See documentation here.
If you are using Genie, you must run the PUISETENV utility to set the environment variables in the job.