× 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 see a few little problems. I can't say for sure which is causing the
RNX9998, but fixing these will get past that (but not where you want to go).

First, change the MOVE 'GENERICMSG" MsgFile to MOVEL

Second, initialize the ErrCode (following your example, insert MOVEL
X'00000000' ErrCode prior to the CALLP.

Third, while you can now get past the RNX9998 you will find you now get
CPF2407 (Message file GENERICMSG in *LIBL*LIBL not found). You need to
only set MsgFile once and then leave it alone. Right now, following the
second EXFMT, you are concatenating *LIBL to 'GENERICMSG*LIBL' from the
first EXFMT processing.

Another problem is that ERRSFL documents that the only messages shown are
those related to the use of the following DDS keywords:

ERRMSG
ERRMSGID
SFLMSG
SFLMSGID
CHECK(M10)
CHECK(M11)
CHECK(VN)
CHECK(VNE)
COMP
RANGE
VALUES

I don't see any of these keywords being used in MSGLINDF... How are you
envisioning that ERRSFL is associated with the messages found in the
external message queue?

There may be other problems, but the above are what jumped out at me. Any
reason you're not using a message subfile?

Bruce

On Wed, Jan 29, 2020 at 1:34 PM Patrik Schindler <poc@xxxxxxxxxx> wrote:

Hello,

I want to show messages from a message file in the message line of a DSPF
with ERRSFL set. I wrote a standalone program with a DSPF to learn how to
accomplish that. You can download and look here:
- https://leela.pocnet.net/~poc/msglindf.txt
- https://leela.pocnet.net/~poc/msglinpg.txt

Additionally, there's a message file QGPL/GENERICMSG (created by me) with
a message HLO0001 just containing a hello for first- and second level text
and *NONE for any answering parameters. (I'm using this very message file
to successfully show messages with ERRMSGID and ERRSFLMSGID in some DSPFs.)

Before anyone is wondering: I'm using an old box with V4R5 for tinkering,
so I can't use free or all-free. Reasons for that are out of scope for my
question. :-)

I read sources I found via Google:
-
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/apis/QMHSNDPM.htm
-
https://www.mcpressonline.com/programming/rpg/sending-a-program-message-in-rpg
-
http://newsolutions.de/forum-systemi-as400-i5-iseries/threads/1716-QMHSNDPM

They are somewhat deviant in how the prototype variables are defined.

After the first press of F10, there's no change in display, especially,
there is no message shown. After the second F10, the *PGM is ended with
RNX9998. I'm stuck here, since I can't find helpful documentation for
RNX9998, nor where I could be wrong with my API call.

May I kindly ask for advice?

:wq! PoC

PGP-Key: DDD3 4ABF 6413 38DE - https://www.pocnet.net/poc-key.asc


--
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@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com




As an Amazon Associate we earn from qualifying purchases.

This thread ...

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