Page 1 of 1
Identify a RPG program call by 5250 session or Web browser
Posted: Thu Feb 09, 2012 12:27 pm
by tcj2001
Is there a way to identify if the RPG program was called by the browser (GENIE) or by 5250 session
Re: Identify a RPG program call by 5250 session or Web browser
Posted: Thu Feb 09, 2012 12:46 pm
by David
Call program PROFOUNDUI/PUI0002300.
Pass a single indicator (N) or 1A parameter. Will be set to *On ('1') to indicate Genie session, *Off ('0'), otherwise.
Re: Identify a RPG program call by 5250 session or Web browser
Posted: Mon Sep 17, 2012 6:46 pm
by bruceanthony
Can this program, PUI0002300 please be extended to programs called anonymously? We have several programs that are called from genie programs and are also called anonymously. In the called program, we use PUI0002300 to test if being called from 5250 or Genie. This methods works great when program is called from genie but does not work if called anonymously. We don't want to test in multiple calling programs we only want to test in the program called. Hope this make sense.
Re: Identify a RPG program call by 5250 session or Web browser
Posted: Mon Oct 01, 2012 1:30 pm
by David
We don't have any pre-built API for this, but the Profound UI session controller sets this environment variable in the job when running outside of Genie:
You can check for this using the "getenv()" API. Here is an example on how to call it using RPG:
http://rpgiv.info/mambo/index.php?optio ... &Itemid=46
Just pass 'PROFOUNDUI' to it. You'll get back '1' if running in a PUI session, *Null, otherwise.