Receive Data Queue (QRCVDTAQ)

From MidrangeWiki
Revision as of 11:54, 17 December 2018 by DaveLClarkI (talk | contribs) (Prototype for the QRCVDTAQ API)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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/LE fully free-form alternative (by Dave Clark):

//==============================================================================
// 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;
// optional 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);
// optional 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