× 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 am calling the program that issues the message from a CLLE program.
The message is being sent from a subprocedure in my RPGLE program.

I want the CLLE program to receive the message.
I originaly had a value of 3.
Then I tried a value of 0, but that did not work.
Then I tried a value of 2, but that did not work either.

What should the value be to get the desired results.

Thanks,


On Tue, Aug 28, 2012 at 12:15 PM, Helge Bichel <hbi@xxxxxxx> wrote:

I think the CallStkCnt could be wrong.
The value required depends on the 'distance' between the call stack for
QMhSndPm
and the call stack where you expect to receive the message.

Right ?

Brgds
Helge

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Jeff Young
Sent: Tuesday, August 28, 2012 5:56 PM
To: RPG programming on the IBM i / System i
Subject: Problem with QMhSndPm

I am using Scott's DIE procedure to trap exceptions in my program and send
an ESCAPE message, but even though the QMhSndPm API is
called, I am not receiving the message.
I have verified that the MSG parm contains the text I wish to send.
Below is the code I am using:

D Die PR

D Msg 256A Const Varying



P Die B

D Die PI

D Msg 256A Const Varying

D QMhSndPm PR ExtPgm('QMHSNDPM')

D MessageID 7A Const

D QualMsgF 20A Const

D MsgData 256A Const

D MsgDtaLen 10I 0 Const

D MsgType 10A Const

D CallStkEnt 10A Const

D CallStkCnt 10I 0 Const

D MessageKey 4A

D ErrorCode 256A

D dsEC DS

D dsECBytesP 10I 0 inz(%size(dsEC))

D dsECBytesA 10I 0 inz(0)

D dsECMsgID 7

D dsECReserv 1

D dsECMsgDta 240

D MsgLen S 10I 0

D TheKey S 4A

/FREE

MsgLen = %CheckR(' ' : Msg);

If MsgLen < 1;

Return;

EndIf;

Dump;

// Send Escape Message

QMhSndPm ('CPF9897'

: 'QCPFMSG *LIBL'

: Msg

: MsgLen

: '*ESCAPE'

: '*'

: 3

: TheKey

: dsEC);

Return;

/END-FREE

P E

T-hanks,

Jeff Young
Sr. Programmer Analyst
--
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.

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

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.