Difference between revisions of "Retrieve Message (QMHRTVM)"
From MidrangeWiki
DaveLClarkI (talk | contribs) |
DaveLClarkI (talk | contribs) (→Prototype for the QMHRTVM API) |
||
(One intermediate revision by the same user not shown) | |||
Line 23: | Line 23: | ||
D pReplCCSID 10i 0 const options(*nopass) | D pReplCCSID 10i 0 const options(*nopass) | ||
</pre> | </pre> | ||
− | An RPG/LE fully free-form alternative: | + | An RPG/LE fully free-form alternative (by [[User:DaveLClarkI|Dave Clark]]): |
<pre> | <pre> | ||
//****************************************************************************** | //****************************************************************************** | ||
Line 50: | Line 50: | ||
== References == | == References == | ||
* [[QMHRTVM_PCML]] | * [[QMHRTVM_PCML]] | ||
− | * [[ | + | * [[API Error Code Structure (ApiErrC)]] |
Latest revision as of 16:57, 17 December 2018
Summary
The QMHRTVM api is used to retrieve message's from message files and optionally replace substitution data.
For more information on this API, visit Retrieve Message (QMHRTVM) API (right-click to open link in a new tab).
Prototype for the QMHRTVM API
DQMHRTVM PR EXTPGM('QMHRTVM') D pMsgInfo 32767a options(*varsize) D pMsgInfoLen 10i 0 const D pReturnFmt 8a const D pMsgId 7a const D pMsgFile 20a const D pMsgData 32767a const options(*varsize) D pMsgDataLen 10i 0 const D pReplSubst 10a const D pRtnCtrl 10a const D pApiErrorDS 32767a options(*nopass:*varsize) D pRtvOption 10a options(*nopass) D pCCSID 10i 0 const options(*nopass) D pReplCCSID 10i 0 const options(*nopass)
An RPG/LE fully free-form alternative (by Dave Clark):
//****************************************************************************** // IBM API to Retrieve Message Text or Full Description (depending on chosen format) // https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/apis/QMHRTVM.htm //****************************************************************************** /include qsysinc/qrpglesrc,qmhrtvm // QMHRTVM API data structures dcl-pr IBMAPI_RtvMsgDesc extpgm('QMHRTVM'); MsgDesc likedS(QMHM010004) options(*varsize); MsgDscL int(10) const; MsgDFmt char(8) const; MsgId char(7) const; MsgMsgF char(20) const; MsgData char(3000) const options(*varsize); MsgDatL int(10) const; MsgROpt char(10) const; MsgFCtl char(10) const; MsgErrC likeds(ApiErrC) options(*varsize); // optional parm group MsgRtvO char(10) const options(*nopass); MsgToCss int(10) const options(*nopass); MsgRCss int(10) const options(*nopass); end-pr;