× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Do you mean for sending messages in an interactive environment such that no
matter from where you send them they end up in the right program message
queue to be caught by the same message subfile on the screen?

Basically, you need to target the procedure that is named in the message
subfile field for queue name (SFLPGMQ).

If your program specified "*" for that field, you need to target the main
procedure of the program (the one AFTER the PEP).

You can either always pass the "target call stack entry" into your messaging
procedures, or, as you suggested (feared?), interrogate the call stack to
determine the name of the procedure. It is sometimes but not always the
name of the program (in my world it never is the same name). I had to do it
once for something, can't remember why, but it involved retrieving the call
stack and reading it upwards until the program name changed, then downward 2
entries (skipping the PEP). My procedures were bound to all executables as
modules, NOT contained in a service program (that's why this worked).

Lately, though, I've taken to percolating (via qmhmovpm and qmhrsnem) from
the originating routine upward until some proc gets them that can do
something with them -- like stop and display them in a message subfile. I
like this method so far.

There have been hundreds of threads on this topic in the past, look around
in the archives for something more.

Stu




On Wed, May 12, 2010 at 13:26, Wintermute, Sharon <
Sharon.Wintermute@xxxxxxxxxxxxxxxx> wrote:



I have several shell routines that were subroutine based using Message
Control subfiles. I am trying to create a basic shell that is procedure
based and the main holdup is QMHSNDPM/QMHRMVPM.



I can get a /include version to work at the main level, but once you get
nested within procedures it doesn't work very well. It looks like I
need to interrogate the call stack in order to get back to the initial
PEP. Am I headed in the right direction?



TIA,



Sharon Wintermute



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



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-2024 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.