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



Jeff,

2 questions:

1. Does the message show up in the job log? If so, taking F1 and then F9
against it, what values does it have for the 'from' and 'to' procedures?
That might help figure out where it's getting sent to (if it is indeed
being sent at all).

2. Can you run it in debug, and if so, what values do you have for dsEC
after the call to QMHSNDPM?

Rory

On Tue, Aug 28, 2012 at 8:56 AM, Jeff Young <jyoung0950@xxxxxxxxx> wrote:

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.





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.