Identify a RPG program call by 5250 session or Web browser

Use this board to ask questions or have discussions with other Genie users.
Post Reply
tcj2001
Profound User
Posts: 40
Joined: Tue Jun 28, 2011 4:55 pm
First Name: Thomson
Last Name: Mathews
Company Name: Chesapeake Energy
Contact:

Identify a RPG program call by 5250 session or Web browser

Post by tcj2001 »

Is there a way to identify if the RPG program was called by the browser (GENIE) or by 5250 session
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: Identify a RPG program call by 5250 session or Web browser

Post 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.
bruceanthony
Profound User
Posts: 52
Joined: Mon Sep 19, 2011 3:00 pm
First Name: Bruce
Last Name: Anthony
Company Name: The State Bar of California
Contact:

Re: Identify a RPG program call by 5250 session or Web browser

Post 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.
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: Identify a RPG program call by 5250 session or Web browser

Post 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:

Code: Select all


PROFOUNDUI=1

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.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests