From: Toby Miller To: All
I have a menu system that I wrote in RPG to handle all of our users' various systems. I want to add the following feature, and was wondering if anyone had any ideas. I would like a user to be able to hit the Attn key from within the menu system and get another menu system display. I tried this by putting the menu system program name in the Attention key field on the user profile, but RPG does not allow for recursive calls to programs. I have gotten it to work by putting an alternate copy of the menu program out in the same library. I remember seeing somewhere a better way to deal with this type of problem, but cannot recall it.
From: James Coolbaugh To: Toby Miller
We created a command to test if a program is currently active. Then, in our Attn program, we can check to see if the program is already active for this user/job. If so, we don't allow the recursive call. I believe that there have been several examples of this in MC and other magazines.
From: Toby Miller To: James Coolbaugh
Thanks for the reply. I was looking for a way to "emulate" recursive calls, but I think I have answered my own question.
I set up a secondary program that is the Attn key program for my menu system (which is program MS0010). When a user running the menu system (MS0010) presses the Attn key, the secondary program picks it up and starts the group job with MS0010 as the initial program. This suspends the first MS0010 in the stack, allowing it to run again. Works just great for allowing hot-keying between different menus while in a program.
From: Trevor Lazarus To: Toby Miller
You may notice that the group job is really a new job and not a suspension of the current job. I use group jobs to jump between several sessions: one has DDS source open; another has the program source open; a third has the application in test. Group jobs are underutilized.
LATEST COMMENTS
MC Press Online