|
This is a multipart message in MIME format. -- [ Picked text/plain from multipart/alternative ] Hello Peter, I don't know why they should react differently, but here is some code I have used to make this work: 1st - the prototype: D SndPgmMsg pr extpgm('QMHSNDPM') D MsgID 7a Const D MsgFName 20a Const D MsgDta 32767a Const Options(*Varsize) D MsgDtaLength 9b 0 Const D MsgType 10a Const D CallStackE 10a Const Options(*Varsize) D CallStackC 9b 0 Const D MsgKey 4a D Error 32767a Options(*Varsize) * * Optional Parameter Group 1 * D CallStackEL 9b 0 Const Options(*Nopass) D CallStackEQ 20a Const Options(*Nopass) D DspPgmMsgWait 9b 0 Const Options(*Nopass) * * Optional Parameter Group 2 * D CallStackEDT 10a Const Options(*Nopass) D MsgCCSID 9b 0 Const Options(*Nopass) Next, a procedure for sending: P SndMsgErr b export D* D SndMsgErr pi D MsgID 7a Const D* PgmMsgQ 10a Const D MsgDta 32767a Const Options(*Varsize : *Nopass) D MsgDtaLen 9b 0 Const Options(*Nopass) D* D PgmMsgDta s like(MsgDta) D PgmDtaLen s like(MsgDtaLen) D MsgKeyA s 4a D* PgmCllStck s 10a inz('*') D PgmCllStck s 10a inz(*blanks) D PgmCllStckC s 9b 0 inz(0) D CallStackEL s 9b 0 inz(10) D CallStackEQ s 20a inz('*NONE') D DspPgmMsgWait s 9b 0 inz(*zeros) D CallStackEDT s 10a inz('*CHAR') D MsgCCSID s 9b 0 inz(0) C* C reset errc0100 C* C eval PgmCllStck = ZZPgmofProc [This contains the name of program invoking the Procedure] *** This is used when defining the PGMMSGQ for DSPF C* C if %parms = 1 C eval PgmMsgDta = *blanks C eval PgmDtaLen = *zeros C else C eval PgmMsgDta = MsgDta C eval PgmDtaLen = MsgDtaLen C endif C* C callp SndPgmMsg(MsgId: C DwhMsg: [This is a named constant, but you can replace] C PgmMsgDta: C PgmDtaLen: C msgtypinfo: C PgmCllStck: C PgmCllStckC: C MsgKeyA: C errc0100) C* C return C* D* P SndMsgErr e Next, the System Data Structure; Dpsds sds D ZZProcName 10a D ZZStatus 5s 0 D ZZPrevSts 5s 0 D ZZSrcLneNbr 8a D ZZRoutine 8a D ZZParms 3s 0 D ZZExcType 3a D ZZExcNbr 4a D ZZReserve1 4a D ZZMsgWrkAra 30a D ZZPgmLib 10a D ZZExcDta 80a D ZZ9001ID 4a D ZZLastFile1 10a D ZZUnused1 6a D ZZJobDate 8a D ZZCentury 2s 0 D ZZLastFile2 8a D ZZFileSts 35a D ZZJobName 10a D ZZUserID 10a D ZZJobNbr 6s 0 D ZZJobRunDte 6s 0 D ZZSysDate 6s 0 D ZZSysTime 6s 0 D ZZCompDate 6 D ZZCompTime 6 D ZZCompLvl 4a D ZZSrcFileName 10a D ZZSrcFileLib 10a D ZZSrcFileMbr 10a D ZZPgmOfProc 10a D ZZModOfProc 10a D ZZSid2128 2s 0 D ZZSid228235 2s 0 D ZZCurrentUser 10a D ZZUnused2 62a In the program which wants to send a message, a simple CALLP works as C callp SndMsgErr('CPF9898':MsgDta:%size(MsgDta)) I hope this helps!! Best Regards John C. Boblitz Jr. Givaudan Dübendorf Ltd. Informatics Ueberlandstrasse 138 CH-8600 Duebendorf, Switzerland Tel: ++41 (0)1 824 22 09 Fax: ++41 (0)1 821 44 78 john_c.boblitz@givaudan.com http://www.givaudan.com "Peter Colpaert" <Peter.Colpaert@honda-eu.com> Sent by: rpg400-l-admin@midrange.com 20.06.2002 07:52 Please respond to rpg400-l To: rpg400-l@midrange.com cc: Subject: RE: Spot the difference Jim, I tried all variations (10i 0 for the Call and 9B 0 for the CallP) but the result stays exactly the same: the message is shown when I Call, but not when I CallP. Thanks anyway. Peter Colpaert Application Developer Honda Europe NV Langerbruggestraat 104 B-9000 GENT Peter.Colpaert@honda-eu.com Tel: +32 9 2501 334 Fax: +32 9 2501 231 ---------- Yoda of Borg are we: Futile is resistance. Assimilate you, we will. ---------- Jim Langston <jlangston@celsinc.com>@midrange.com on 19/06/2002 20:45:52 Please respond to rpg400-l@midrange.com Sent by: rpg400-l-admin@midrange.com To: "'rpg400-l@midrange.com'" <rpg400-l@midrange.com> cc: Subject: RE: Spot the difference The only difference I see at first glance is that the API passes the Msglen and Msgstk as 10i 0 and the CallP passes them as 9B 0. Not sure if this should make a difference though. Why not try changing the Msglen and Msgstk declarations as 10i 0 and run the CallP and see if it breaks it? Regards, Jim Langston ______________________________________________________________________ The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual or the entity to whom it is addressed and others authorised to receive it. If you have received it by mistake, please let the sender know by e-mail reply and delete it from your system. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance of the contents of this information is strictly prohibited and may be unlawful. Honda Europe NV is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt. _______________________________________________ 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.
As an Amazon Associate we earn from qualifying purchases.
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.