Difference between revisions of "Receive Data Queue (QRCVDTAQ)"

From MidrangeWiki
Jump to: navigation, search
m (DaveLClarkI moved page QRCVDTAQ to Receive Data Queue (QRCVDTAQ): Better Indexing (too many Q's))
Line 2: Line 2:
 
[[Category:RPG_Prototypes]]
 
[[Category:RPG_Prototypes]]
 
[[Category:Data Queue]]
 
[[Category:Data Queue]]
=Receive Data Queue Entry=
+
== Summary ==
 
Receives an entry from a [[:Category:Data Queue|Data Queue]].
 
Receives an entry from a [[:Category:Data Queue|Data Queue]].
 +
 +
For more information on this API, visit [https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/apis/qrcvdtaq.htm Receive Data Queue (QRCVDTAQ) API] (right-click to open link in a new tab).
 +
 +
== Prototype for the QRCVDTAQ API ==
 
<pre>
 
<pre>
 
DQRCVDTAQ        PR                  EXTPGM('QRCVDTAQ')         
 
DQRCVDTAQ        PR                  EXTPGM('QRCVDTAQ')         
Line 12: Line 16:
 
D prDQWait                      5P 0 const                     
 
D prDQWait                      5P 0 const                     
 
</pre>
 
</pre>
 +
 +
An RPG fully free-form alternative:
 +
<pre>
 +
//==============================================================================
 +
// IBM API to Receive an entry from a Data Queue
 +
// https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/apis/qrcvdtaq.htm
 +
//==============================================================================
 +
dcl-pr IBMAPI_RecvFromDtaQ  extpgm('QRCVDTAQ');
 +
  DtaQName              char(10)    const;
 +
  DtaQLib              char(10)    const;
 +
  DtaQBufLen            packed(5:0);
 +
  DtaQBuffer            char(65535)        options(*varsize);
 +
  DtaQWait              packed(5:0) const;
 +
// opional parm group 1
 +
  DtaQKeyOrd            char(2)    const  options(*nopass);
 +
  DtaQKeyLen            packed(3:0) const  options(*nopass);
 +
  DtaQKeyData          char(256)  const  options(*nopass:*varsize);
 +
  DtaQSndLen            packed(3:0) const  options(*nopass);
 +
  DtaQSndInf            char(44)    const  options(*nopass:*varsize);
 +
// opional parm group 2
 +
  DtaQRemove            char(10)    const  options(*nopass);
 +
  DtaQBsize            packed(5:0) const  options(*nopass);
 +
  DtaQErrC              likeds(ApiErrC)    options(*nopass:*varsize);
 +
end-pr;
 +
</pre>
 +
 +
== References ==
 +
* [[ApiErrC — API Error Code]]

Revision as of 16:28, 7 December 2018

Summary

Receives an entry from a Data Queue.

For more information on this API, visit Receive Data Queue (QRCVDTAQ) API (right-click to open link in a new tab).

Prototype for the QRCVDTAQ API

DQRCVDTAQ         PR                  EXTPGM('QRCVDTAQ')        
D prDQName                      10A   const                     
D prDQLibr                      10A   const                     
D prDQLen                        5P 0                           
D prDQData                   32767A   options(*varsize)         
D prDQWait                       5P 0 const                     

An RPG fully free-form alternative:

//==============================================================================
// IBM API to Receive an entry from a Data Queue
// https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/apis/qrcvdtaq.htm
//==============================================================================
dcl-pr IBMAPI_RecvFromDtaQ   extpgm('QRCVDTAQ');
  DtaQName              char(10)    const;
  DtaQLib               char(10)    const;
  DtaQBufLen            packed(5:0);
  DtaQBuffer            char(65535)         options(*varsize);
  DtaQWait              packed(5:0) const;
// opional parm group 1
  DtaQKeyOrd            char(2)     const   options(*nopass);
  DtaQKeyLen            packed(3:0) const   options(*nopass);
  DtaQKeyData           char(256)   const   options(*nopass:*varsize);
  DtaQSndLen            packed(3:0) const   options(*nopass);
  DtaQSndInf            char(44)    const   options(*nopass:*varsize);
// opional parm group 2
  DtaQRemove            char(10)    const   options(*nopass);
  DtaQBsize             packed(5:0) const   options(*nopass);
  DtaQErrC              likeds(ApiErrC)     options(*nopass:*varsize);
end-pr;

References