|
Gade:
The following is portions of source from a trigger program named TRIGGER (original, huh?).
TRIGGER is activated *Before each *Update to a certain file. If data conditions are not met, the QMHSDNPM API is called to prevent the update.
This does work, but it is my first attempt at using QMHSNDPM. I haven't gotten beyond stopping the update from occuring (no nice user messages being displayed, etc).
Sorry I don't have huge amounts of info to pass along. Hope this helps to get you started. For real info, check out OS/400 Message Hadling APIs V4R4 at http://publib.boulder.ibm.com:80/cgi-bin/bookmgr/BOOKS/QB3AMN03/CCONTENTS. QMHRMVPM is in section 1.15 & QMHSNDPM is in section 1.23.
-Anth
p.s. Say "hi" to Joel for me!
Anthony Paul
RCM Technoligies
PORTIONS OF SOURCE FROM PROGRAM "TRIGGER"
* output for QMHSDNPM (API)
d msgerr ds
d provid 1 4b 0
d avail 5 8b 0
d rtnmsg 9 15
d rsvr 16 16
d rtndta 17 56
d flds ds
d msglen 1 4b 0
d pgmstk 5 8b 0
d rtvlen 9 12b 0
d msgqlen 13 16b 0
d pgmwtt 17 20b 0
* msgqnam is the call stack entry we want the msg to go to (?) - TRIGGER is PGM name
d msgqnam c const('_QRNP_PEP_TRIGGER')
d modname c const('*NONE *NONE ')
c plist1 plist
c parm msgid 7
c parm msgf 20
c parm msgdta 25
c parm msglen
c parm msgtyp 10
c parm msgque 17
c parm pgmstk
c parm msgkey 4
c parm msgerr
c parm msgqlen
c parm csequal 20
c parm pgmwtt
* msgf containing message TRG0001 is ACPLIB/ACPMSGF
c movel(p) 'TRG0001' msgid
c movel(p) 'ACPLIB' lib 10
c movel(p) 'ACPMSGF' id 10
c id cat(p) lib msgf
c move ' ' msgdta
c z-add 25 msglen
c movel(p) '*ESCAPE' msgtyp
c movel(p) msgqnam msgque
c move modname csequal
c z-add 17 msgqlen
c move ' ' msgdta
c z-add 1 pgmstk
c move ' ' msgkey
c z-add 66 provid
c z-add 0 avail
c move ' ' rtnmsg
c move ' ' rsvr
c move ' ' rtndta
c call 'QMHSNDPM' plist1
c endsr
-----Original Message-----
From: Gade_R_Reddy@consecofinance.com
[mailto:Gade_R_Reddy@consecofinance.com]
Sent: Wednesday, February 23, 2000 9:55 AM
To: RPG400-L@midrange.com
Subject: Message API
I am trying to pass parameters to a message that is displayed on the screen
using the API's (QMHSNDPM & QMHRMVPM).
Anyone got an example???.
Thanks.
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.