There are so many ways to skin this cat.

Personally, I've never used messages as a standard solution for this. tend to use messages as an "Oh sh*t something has gone wrong and I need to get outa of here" situation. I've also used CEETREK from time to time, where it was simpler.

It depends, of course, on the application structure. In some cases, I have seen people set a data area to indicate that F03 was requested. It is then a simple matter of following any call to a program that can receive F03 to test that data area, set the indicator associated with F03 in the program in question and ...


Jon Paris
Jon.Paris@xxxxxxxxxxxxxx



On Aug 10, 2025, at 5:40 PM, Patrik Schindler <poc@xxxxxxxxxx> wrote:

Hello,

I'm rolling around this thought in my head for some time now and fail to come up with a convenient solution. So I thought, I ask: How did you do this, back in the days?

Assume an interactive application program is started from a menu. Within this application program, the user triggers some action which CALLs a secondary interactive program. The user eventually found what he searched for, and decides to cancel the whole task.

As far as I understood, F12 means "go back one step", and F3 means "go back further". Note: "further" is my term, I can't recall how IBM named it.
Some time ago, there was a discussion about the invention of the S/38 CPF in the Midrange-Main list. There were some links to historic documentation which in part was very enlightening to me. I found an explanation about F3 meaning "go back to the last menu". At least that's how I understood the text.

In the example above, the user would probably expect the F3 request to put him back to the menu he started the first application program from. So, to end a chain of application programs, the F3-Request needs to be passed on to the respective calling program, making it aware of the request, and making it end also. In turn the user's screen is displaying the last menu he navigated to.

Now I wonder what is the proper way to make the calling application aware about an ending request in a called program.

I have a guts feeling that this might be another case where I need to face my nemesis: Messages. Something I repeatedly fail to grok. Maybe I'm just too used to POSIX signals on Linux.

So if messages are the proper way to handle this, web links to examples would be very helpful. Maybe I can utilize learning by doing.

Thanks!

:wq! PoC

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.