Difference between revisions of "Send Program Message (QMHSNDPM)"

From MidrangeWiki
Jump to: navigation, search
(Created page with "Category:RPG_Prototypes Category:API = Summary = The following is an RPG/LE free-form prototype for the IBM QMHSNDPM API to send a message to a program queue. = Proto...")
 
(References)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
[[Category:API]]
 
[[Category:RPG_Prototypes]]
 
[[Category:RPG_Prototypes]]
[[Category:API]]
+
== Summary ==
= Summary =
 
 
The following is an RPG/LE free-form prototype for the IBM QMHSNDPM API to send a message to a program queue.
 
The following is an RPG/LE free-form prototype for the IBM QMHSNDPM API to send a message to a program queue.
  
= Prototype for the QMHSNDPM API =
+
For more information on this API, visit [https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/apis/QMHSNDPM.htm Send Program Message (QMHSNDPM) API] (right-click to open link in a new tab).
 +
 
 +
== Prototype for the QMHSNDPM API ==
 
<pre>
 
<pre>
 
       *========================================================================*
 
       *========================================================================*
Line 18: Line 20:
 
       *
 
       *
 
       * DOCUMENTATION:
 
       * DOCUMENTATION:
       * http://publib.boulder.ibm.com/infocenter/iseries/v6r1m0/topic/apis/QMHSNDPM.htm
+
       * https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/apis/QMHSNDPM.htm
 
       *========================================================================*
 
       *========================================================================*
 
       dcl-pr IBMAPI_SendPgmMsg ExtPgm('QMHSNDPM');
 
       dcl-pr IBMAPI_SendPgmMsg ExtPgm('QMHSNDPM');
Line 28: Line 30:
 
         pMsgCStEnt          Char(10)  Const;
 
         pMsgCStEnt          Char(10)  Const;
 
         pMsgCStCnt          Int(10:0)  Const;
 
         pMsgCStCnt          Int(10:0)  Const;
         pMsgKey            Char(4);
+
         pMsgKey            Int(10:0);
 
         pMsgErrC            LikeDS(ApiErrC) Options(*Varsize);
 
         pMsgErrC            LikeDS(ApiErrC) Options(*Varsize);
 +
      * optional parm group 1
 
         pMsgCStLen          Int(10:0)  Const Options(*Nopass);
 
         pMsgCStLen          Int(10:0)  Const Options(*Nopass);
 
         pMsgCStQua          Char(20)  Const Options(*Nopass);
 
         pMsgCStQua          Char(20)  Const Options(*Nopass);
 
         pMsgDsWait          Int(10:0)  Const Options(*Nopass);
 
         pMsgDsWait          Int(10:0)  Const Options(*Nopass);
 +
      * optional parm group 2
 
         pMsgCStTyp          Char(10)  Const Options(*Nopass);
 
         pMsgCStTyp          Char(10)  Const Options(*Nopass);
 
         pMsgCcsId          Int(10:0)  Const Options(*Nopass);
 
         pMsgCcsId          Int(10:0)  Const Options(*Nopass);
Line 39: Line 43:
  
 
== References ==
 
== References ==
* [[ApiErrC]]
+
* [[API Error Code Structure (ApiErrC)]]

Latest revision as of 22:57, 13 December 2018

Summary

The following is an RPG/LE free-form prototype for the IBM QMHSNDPM API to send a message to a program queue.

For more information on this API, visit Send Program Message (QMHSNDPM) API (right-click to open link in a new tab).

Prototype for the QMHSNDPM API

      *========================================================================*
      * IBM API to Send to a Program Message Queue
      *
      * EXAMPLE:
      * callp IBMAPI_SendPgmMsg( 'WSE9897': 'WSMSGF    SHR460': mtxt: %len(mtxt)
      *                        : '*INFO': '*': 3: mkey: ApiErrC);
      * if (ApiErrC.BytAvail > *zero); // if an error occurred
      *   return *off;                 // indicate an error
      * endif;
      * return *on;                    // indicate success
      *
      * DOCUMENTATION:
      * https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/apis/QMHSNDPM.htm
      *========================================================================*
       dcl-pr IBMAPI_SendPgmMsg ExtPgm('QMHSNDPM');
         pMsgId              Char(7)    Const;
         pMsgFile            Char(20)   Const;
         pMsgData            Char(3000) Const Options(*Varsize);
         pMsgDtaLen          Int(10:0)  Const;
         pMsgType            Char(10)   Const;
         pMsgCStEnt          Char(10)   Const;
         pMsgCStCnt          Int(10:0)  Const;
         pMsgKey             Int(10:0);
         pMsgErrC            LikeDS(ApiErrC) Options(*Varsize);
      * optional parm group 1
         pMsgCStLen          Int(10:0)  Const Options(*Nopass);
         pMsgCStQua          Char(20)   Const Options(*Nopass);
         pMsgDsWait          Int(10:0)  Const Options(*Nopass);
      * optional parm group 2
         pMsgCStTyp          Char(10)   Const Options(*Nopass);
         pMsgCcsId           Int(10:0)  Const Options(*Nopass);
       end-pr;

References