Page 1 of 1

Closing a Browser Tab and Execute Signoff

Posted: Tue Apr 01, 2014 12:04 pm
by dieter
Hello,
we want to end a RPG program inclusive closing the browser tab. We don't want the user to click onto the close button of the tab. The user does something in our ProfoundUI application and then the program should end completely. We tried "pui.closeSession", but this method makes that the RPG program gets an failure because the device is closed. What we want is a proper signoff.

The background for this is the following:
Our Java developers want to call a special RPG program by starting a Genie session. (Because we use Kerberos is is no problem to open a session without typing in a password.) On the iSeries in the signon script we recogneize that a special program shall be called. Then we call the programm and the user e.g. can select a customer in a grid. When the user has done the selection the data is given to the java program (running on a PC) and the RPG program should be closed accurately.

The problem is if we do a signoff in the RPG program, the program ends an we can't close the window. If we close the window first the RPG program gets an device error an we can't do a signoff.

Dieter

Re: Closing a Browser Tab and Execute Signoff

Posted: Wed Apr 02, 2014 2:31 am
by Scott Klement
Sounds like you are running the RPG program in a Genie session. Is that correct?

If so, the challenge you are facing is simply that you are running in a 5250 session. Just like if you were in Client Access or similar software, you'll need to exit the RPG program, go back to the command-line or menu, and execute the SIGNOFF command to end the session properly.

It's possible to automate all of this using Genie Macros. Your Java developer can execute a URL that invokes a Genie macro, you might even set up the macro to accept the program name and parameter data using the varX= and valueX= options in the URL.

Details of creating a Genie macro may be found here:
http://www.profoundlogic.com/docs/display/PUI/Macros

Re: Closing a Browser Tab and Execute Signoff

Posted: Wed Apr 02, 2014 5:17 am
by dieter
Hello Scott,

thank you. With your answer we couldt solve our problem.

Dieter