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



Doesn't the message have to go to '*EXT', rather than just '*' to show up on
the screen?  That's the way I've always used it.

HTH

Martin


-----Original Message-----
From: Chris Devous [mailto:cdevous@antigua.com]
Sent: 22 February 2002 16:25
To: rpg400-l@midrange.com
Subject: QMSHNDPM API


All,

Am I missing the forest because the trees are blocking the view here?

Given the following prototype:

D SndPgmMsg       PR                  ExtPgm('QMHSNDPM')
D   MsgCode                      7a   const
D   MsgFileLib                  20a   const
D   MsgData                  32766a   const options(*varsize)
D   MsgDataLen                  10i 0 const
D   MsgType                     10a   const options(*varsize)
D   MsgQueue                    10a   const
D   MsgQueueNbr                 10i 0 const
D   MsgQKey                      4a
D   ErrorCode                32766a   options(*varsize)
D   callStkEntLen...
D                               10i 0 const options(*nopass)
D   callStkEntQual...
D                               20    const options(*nopass)
D   dspPgmMsgTime...
D                               10i 0 const options(*nopass)
D   callStkEntType...
D                               10    const options(*nopass)
D   msgDtaCCSID                 10i 0 const options(*nopass)
 *
D dsEC            DS
D  dsECBytesP             1      4I 0 INZ(256)
D  dsECBytesA             5      8I 0 INZ(0)
D  dsECMsgID              9     15
D  dsECReserv            16     16
D  dsECMsgDta            17    256
 *
D KeyVal          S              4a    Inz(*Blanks)
D MsgTxt          S            100a    Inz(*Blanks)

Shouldn't the following code send a message to my screen?  The
message appears on the joblog when I look at
dspjoblog/detailed messages, but not on the screen...

Eval      MsgTxt =  "The message I want to send"
reset                   KeyVal
callp     SndPgmMsg('CPF9898':
                    'QCPFMSG   *LIBL  ':
                    MsgTxt:
                    %Len(MsgTxt):
                    '*INFO':
                    '*':
                    1:
                    KeyVal:
                    dsEC)

This is followed by

if        dsECBytesA > 0
eval      Msg = 'QMSNDPM error ' + dsECMsgID
dsply                   msg
return
endif

No error occurs in the program or procedure.

"The message I want to send" never appears on screen.

"The message I want to send" does appear in dspjoblog/detailed
messages.

Is my prototype wrong?  Is my call stack entry wrong?  There's
clearly something I have missed and am not seeing.  Any help
would be appreciated, as I slowly descend into madness...

--Chris


_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


********************************************************************************************
" This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst & Young Group. It is intended only for
the person to whom it is addressed. If you are not the intended recipient, you
are not authorized to read, print, retain, copy, disseminate, distribute, or use
this message or any part thereof. If you receive this message in error, please
notify the sender immediately and delete all copies of this message ".
********************************************************************************************


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.