Starting a new browser from RPG

Use this board to ask questions or have discussions with other Rich Displays users.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Starting a new browser from RPG

Post by Scott Klement »

Sheri,

Opening up a Genie session has it's own special considerations, of course, since it is a 5250 session. Whenever you open up Genie, you are creating an interactive job on IBM i, and going through the system's interactive sign-on process. Just like when you log on to Client Access, then you have to sign in, and go through a process of navigating the command line and/or menus to get to the program, etc. If you simply "click the X in the corner" to close the window, the program gets an error and the job is ended abnormally, etc. This is all part of the nature of a 5250 session, and because this is the way the operating system works with 5250, there's not much we can do about this behavior.

What we do provide is a system of Genie macros that you can use to navigate screens, etc, so the user only sees the application they want, and the macro handles the process of getting them there. You can learn more about these Genie macros here:
http://www.profoundlogic.com/docs/display/PUI/Macros

As is described on that doc page, Genie macros can be initiated from the URL. So if you wanted to open a new window and have it run a macro to get the Genie session to run the program that shows a PO or whatever, you could certainly do that... write the macro, get it all working, and then launch the URL.

An easy way to launch the URL would be with a little bit of JavaScript that does window.open(). This would let you open it in a new window/tab without affecting the one that's already open. (Or, you could accomplish something similar with STRPCCMD, but window.open would be more streamlined, imho)
slmcpherson
New User
Posts: 14
Joined: Tue Nov 26, 2013 11:12 am
First Name: sheri
Last Name: mcpherson
Company Name: winwholesale, inc.
Contact:

Re: Starting a new browser from RPG

Post by slmcpherson »

Scott,
Thank you very much for this information I will certainly investigate using macros to accomplish this task. I appreciate your feedback!

Have a great day!
tmoeller@ecclesia.de
New User
Posts: 1
Joined: Tue May 15, 2012 5:07 am
First Name: Thomas
Last Name: Möller
Company Name: Ecclesia GmbH
Contact:

Re: Starting a new browser from RPG

Post by tmoeller@ecclesia.de »

We also got the task to open a new session with a signed in user, so the anonymous call was no alternative.
So we build a table, where applications could write the next task for a user. Our starting program for all user profiles checks, if there are unexecuted "next tasks" for a user. Thanks to Kerberos single signon and Genie macros, the user reaches directly the appropriate program. If there is no "next task", the user got the normal start menu. For sure it only works, when the user has not exceed his number of sessions.
We use this technique from our DMS, a PC application written in Java, to jump directly to a varity of iSeries programs.

The macro for skipping the first message and to close the window, when the signon screen appears looks like that (for german language):

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<macro>
   <detectonce>
      <id row="1" col="15">            Programmnachrichten anzeigen</id>
	  <key>Enter</key>
   </detectonce>
   <detect>
      <id row="1" col="22">             Anmelden</id>
	  <id row="2" col="47">System  . . . . . :</id>
	  <close />
   </detect>  
</macro>   
Hope this helps a little bit!
Thomas
slmcpherson
New User
Posts: 14
Joined: Tue Nov 26, 2013 11:12 am
First Name: sheri
Last Name: mcpherson
Company Name: winwholesale, inc.
Contact:

Re: Starting a new browser from RPG

Post by slmcpherson »

Thank you Thomas for your thoughts and letting me know how you do things there.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests