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



Joep,

I think that you need to properly space the entries in the MsgInf (aka MsgTyp) field. Each type is 10 long. According to the manual:
Message types Input Array of Char(10)


I personally would take the options(*varsize) off the MsgTyp and put const there instead.

-mark

On 11/9/2021 3:11 AM, Joep Beckeringh via RPG400-L wrote:
Hello all,

I've got the following strange situation:

In a procedure in a program I call a few things and in the end I want to move messages that I received to the calling procedure, that uses a display file with a message subfile. So I call API QMHMOVPM, but that reports error CPF24A5 'Value of &1, for number of message types, not valid.'. Message data is X'00000003', which looks like a 4 byte integer containing the value 3, like it should.

Funny thing is, I have exactly the same call in several other programs and they don't give an error (I checked in debug).

The prototype for the call is in an include member and looks like this:

// Move program messages
dcl-pr QMHMOVPM extpgm;
MsgKey char(4) const;
MsgTyp char(40) const options(*varsize);
MsgTypCnt uns(10) const;
CstEnt char(10) const;
CstCnt uns(10) const;
ErrDts char(1) options(*varsize);
end-pr;

And the call looks like this:

// Move program messages
QMHMOVPM(MsgKey: MsgInf: MsgCnt: '*': 1: ErrDts);

MsgKey is char(4), MsgInf char(30) and contains '*COMP *DIAG *INFO', MsgCnt = uns(10) and contains 3.

Only special thing about this program is that the calling procedure is recursive (the program is an IFS browser; if you choose a directory it starts a new instance of the procedure). But I fail to see how that influences the call to QMHMOVPM.

Anyone any bright ideas about this?

Joep Beckeringh
Pantheon Automatisering



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.