Page 2 of 2

Re: Starting a new browser from RPG

Posted: Wed Oct 08, 2014 11:07 am
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)

Re: Starting a new browser from RPG

Posted: Wed Oct 08, 2014 2:22 pm
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!

Re: Starting a new browser from RPG

Posted: Thu Oct 09, 2014 5:29 am
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

Re: Starting a new browser from RPG

Posted: Thu Oct 09, 2014 7:23 am
by slmcpherson
Thank you Thomas for your thoughts and letting me know how you do things there.