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



I think I am back on track.
Like you Mark, just after my display logic, I call a pgm to "clean up
from the last menu item".
the RMVMSG had been commented out, now has this:
RMVMSG PGMQ(*PRV) CLEAR(*OLD).

the above does appear to work. A previous line still commented out is
/* RMVMSG (*PRV) CLEAR(*ALL) */
there appear to be other attempts at this, that are no longer in play,
one was a program that would get the last completion message, and then do
a:
QMHRMVPM( '*': 1: wMsgKey: '*BYKEY': APIErrorDS );

I will make a new thread in midrange-l about the "larger issue" that causes
this trip down the rabbit hole.
(where did all those job log entries go? they were there an hour ago!)



On Thu, Mar 16, 2023 at 10:32 AM Mark Murphy <jmarkmurphy@xxxxxxxxx> wrote:

Now that I am comparing, it appears that you are doing the same thing I do.
Maybe you are not handling messages, which would remove old messages from
the queue.

One of the first things I do after a read, and before starting to process
the screen is to clear the messages.

dcl-s name_t Char(10) Template;

dcl-ds errCode_t Qualified Template;
bytesProvided Int(10) Inz(%size(errCode_t));
bytesAvail Int(10) Inz(0);
messageId Char(7) Inz('');
messageData Char(256) Pos(17) Inz('');
end-ds;

dcl-ds callStackEntryQual_t Qualified Template;
module Like(name_t) Inz('*NONE');
program Like(name_t) Inz('*NONE');
end-ds;

// ------------------------------------
// QMHRMVPM - Remove Program Message
// See the Knowledge Center for descriptions of parameters
dcl-pr qmhrmvpm ExtPgm('QMHRMVPM');
cse Char(4096) const options(*varsize);
counter Int(10) const;
msgKey Char(4) const;
toRemove Char(10) const;
errCd LikeDs(errCode_t) options(*varsize);
cseLen Int(10) const options(*nopass);
cseQualifier LikeDs(callStackEntryQual_t) const options(*nopass);
removeExcept Char(10) const options(*nopass);
cseDataType Char(10) const options(*nopass);
allowRpyReject Char(10) const options(*nopass);
end-pr;

// ------------------------------------
// Clear Display File Messages
// Clears the messages in the display file message subfile
//
// Parameters:
// pgmq - Program message queue. This must be the same as the pgmq
// specified in the display file.
// ------------------------------------
dcl-proc ClearDspfMsg Export;
dcl-pi *n;
pgmq Char(10) const;
end-pi;

dcl-ds ec LikeDs(errCode_t) Inz(*LikeDs);

qmhrmvpm(pgmq: 0: '': '*ALL': ec);
// TODO Provide error checking here
end-proc;

On Thu, Mar 16, 2023 at 11:22 AM Mark Murphy <jmarkmurphy@xxxxxxxxx>
wrote:

This is hope I define my message subfiles:

A*
========================================================================
A* Message Subfile
A*
------------------------------------------------------------------------
A R MSGSFL SFL
A SFLMSGRCD(24)
A MSGKEY SFLMSGKEY
A PGMQ SFLPGMQ
A*
------------------------------------------------------------------------
A* Message Subfile - Control format
A*
------------------------------------------------------------------------
A R MSGCTL SFLCTL(MSGSFL)
A KEEP
A OVERLAY
A SFLINZ
A SFLPAG(1)
A SFLSIZ(2)
A SFLDSP SFLDSPCTL
A 52
AON52 SFLEND(*PLUS)
A PGMQ SFLPGMQ

When I initialize the program, I initialize PGMQ to the Main procedure
name found in the PSDS at position 1, and write the format just before
the
main format on the screen. Everything else is automatic. No need no need
to
load messages, it just reads them off the program queue. If I need to
display a message, I just send it to the program queue. The first one I
send is the first one that shows up.

On Wed, Mar 15, 2023 at 5:43 PM Patrik Schindler <poc@xxxxxxxxxx> wrote:

Hello Gerald,

Am 14.03.2023 um 16:49 schrieb Gerald Magnuson <
gmagqcy.midrange@xxxxxxxxx>:

(this used to work.. I don't know when or how I broke it)
I have a message subfile on bottom of my menu.
it used to show the *COMP messages that came from the previous
executed
menu option.
those messages are in the subfile, but the first message is displayed
(from
just after signon), not the last message in that subfile.

is there something to show the LAST message, or reverse the order?

No. Since there is no SFLRCDNBR involved, there is no control over the
process from this side.

I haven't bothered with message subfiles in-depth, yet. I'm also at a
loss, sorry. But I have seen IBM provided messages where you see the
last
message and must scroll back. So it should be possible.

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


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