Difference between revisions of "Retrieve Message (QMHRTVM)"
From MidrangeWiki
DaveLClarkI (talk | contribs) m (DaveLClarkI moved page QMHRTVM to QMHRTVM — Retrieve Message: More descriptive titles.) |
DaveLClarkI (talk | contribs) (→Prototype for the QMHRTVM API) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:API]] | ||
[[Category:RPG_Prototypes]] | [[Category:RPG_Prototypes]] | ||
− | |||
= Summary = | = Summary = | ||
The QMHRTVM api is used to retrieve message's from [[message files]] and optionally replace substitution data. | The QMHRTVM api is used to retrieve message's from [[message files]] and optionally replace substitution data. | ||
+ | |||
+ | For more information on this API, visit [https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/apis/QMHRTVM.htm Retrieve Message (QMHRTVM) API] (right-click to open link in a new tab). | ||
+ | |||
= Prototype for the QMHRTVM API = | = Prototype for the QMHRTVM API = | ||
<pre> | <pre> | ||
Line 19: | Line 22: | ||
D pCCSID 10i 0 const options(*nopass) | D pCCSID 10i 0 const options(*nopass) | ||
D pReplCCSID 10i 0 const options(*nopass) | D pReplCCSID 10i 0 const options(*nopass) | ||
+ | </pre> | ||
+ | An RPG/LE fully free-form alternative (by [[User:DaveLClarkI|Dave Clark]]): | ||
+ | <pre> | ||
+ | //****************************************************************************** | ||
+ | // 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; | ||
</pre> | </pre> | ||
== 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;