Hello,
Is it possible to create some kind of RPG sevice program that will reseide in the memory and await for a function key pressed while another program with its own DSPF is interacting with user?
For example, user is intereacting with an input screen and secret functional key will allow a popup screen to come up. The secret functional key is not defined in program and DSPF the user is interacting to.
Thanks in advance!
Yimmy
Software/Hardware used:
IBM iSeries
ASKED:
November 10, 2011 1:22 PM
UPDATED:
March 17, 2012 6:56 AM
No., This is not possible.
Phil
At least one possible method would be an Attention program that was set either before the subject program is called or by the subject program.
The Attention program could use any desired logic such as testing the job user to determine if it should run or not. If it determines that it shouldn’t run, it could call the user’s normal Attention program.
Tom
Attached to the attention key?
As you’re talking DSPF then I assume we are discussing block mode (5250) terminal emulation.
When a key is pressed, control is returned to the program, with the buffer.
Your program could conceivably always pass control to a service program which carries out some standard interrogation of the passed information to see if it should initiate a window.
Frankly, performance would be better f you just abstract this functionality to a called program.
Display panel
Receive control
if key pressed, call popup,
else get on with stuff
The pop up function is just a stand alone program – much as the concept of a service program.
At some level, you have to link the key press to the desired action. Once you’ve done that, how you deal with it is a matter of taste, standards, and performance.
.
For us almost every dept has a different attention key menu pop-up with options we specify based on most needed access for that dept and/or user. An example of use would be to stay in a customer order screen an look up an in house phone #. In a few cases the pop-up is user specific and assigned to only one user profile. The pop-up menu can be as detailed a deemed necessary. And we do have some who have no attention key program assigned at all. An option all our programmers have is to “QUIT” while editing code which signs us off and when we sign in the next time it takes us back to the edit screen in the same code source. I thought the attention key “STUFF” was just something everybody had and used but Maybe not.
For example, user is intereacting with an input screen…
Do you want this function to always be available no matter which display file is in use? Or are you asking about how to make it work for specific display files and programs?
…and secret functional key will allow a popup screen to come up.
Secret? From whom? If it’s secret from users, then it must be for some specific ‘special’ users. It wouldn’t make a lot of sense to have it be functional under a user who wasn’t supposed to know that it existed. It could only be used if the ‘special’ user pressed the key in a normal user’s session. When that happened, the secret would be out.
So that kind of implies that it only needs to be functional under a ‘special’ user’s session.
And for that, all you have to do is condition the key based on user.
Or is there more info that might help clarify what you need?
Tom