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




You need to pass the optional parameters to the QMHSNDPM API. One of them is the call stack entry length, which needs to be set appropriately, otherwise the API will assume 10.

http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/apis/QMHSNDPM.htm

---
Scott Klement  http://www.scottklement.com

On Tue, 15 Nov 2005, Kurt Anderson wrote:

I've been going through a learning process with QMHSNDPM and
subprocedures.
For our standard programs w/o procedures, we pass '*' as the PgmQ.
That didn't work for subprocedures.
So I started passing in the name of the procedure that is displaying the
message.
That worked fine when the procedure names were 10a.
I changed our wrapper to handle a larger PgmQ value, and changed the
SFLPGMQ keywords in the display file to SFLPGMQ(276).
I have the call stack entry value set at 0 (unless overridden).

So now when I pass it the subprocedure name that is longer than 10a, I
don't see the messages.
If I'm coming from a subprocedure that is 10a or less, I do see the
messages (even after the changes I made above).

Is there some kind of limitation I'm running into, or do I have a
setting wrong...or is there any other mistake I might be making?


     //  Program-Defined Fields
    D MsgFile         S             20a   Inz( 'APPLMSGF  *LIBL     ' )

    D MsgType         S             10a   Inz( '*DIAG     ' )

Wrapper Prototype:
     //  Entry Parameters Prototype

    D EntryParms      PR                  ExtPgm( 'MSGMPRCSND' )

    D  EP#MsgID                      7a   Const

    D  EP#MsgDataLen                10i 0 Const

    D  EP#MsgData                  256a   Const

    D  EP#PgmQ                    4096a   Const

    D  EP#StackCount                10i 0 Const Options( *NoPass )


QMHSNDPM prototype:
     //  Send Program Message API

    D SndPgmMsg       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                4096a   Const

    D   CallStkCnt                  10i 0 Const

    D   MessageKey                   4a

    D   ErrorCode                         Like( ErrorDS )


     //  Error Data Structure

    D ErrorDS         DS                  Inz

    D  BytesProv                    10i 0 Inz( %size( ErrorDS ) )

    D  BytesAvail                   10i 0

    D  MessageID                     7a

    D  Err###                        1a

    D  MessageDta                  100a

.. ok, I hope that's everything I needed to send.  :)

Kurt Anderson
Application Developer
Highsmith Inc.
W5527 State Road 106, P.O. Box 800
Fort Atkinson, WI 53538-0800
TEL (920) 563-9571  FAX (920) 563-7395
EMAIL kjanderson@xxxxxxxxxxxxx

--
This is the RPG programming on the AS400 / iSeries (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 ...

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.