|
-----Original Message----- From: Stephen Hunt Sent: 01 June 2004 13:10 To: RPG programming on the AS400 / iSeries Subject: RE: MSGQ Hi Ron, Well, to keep this on topic, you could try the following piece of code. Regards, Stephen Hunt D MsgQueue s 20a * API Error data structure D Qusec DS D Qusbprv 10i 0 inz(%size(Qusec)) D Qusbavl 10i 0 inz(0) D Qusei 7a D Quserved 1a D Qusmsgdta 240a * API structures for Retrieve Nonprogram Message Queue Attributes API D/COPY QSYSINC/QRPGLESRC,QMHRMQAT * Prototype for Retrieve Nonprogram Message Queue Attributes API D RtvNonpgmMsgQAttr... D pr extpgm('QMHRMQAT') D ObjRcvVar 256a options(*varsize) D ObjRcvLen 10i 0 const D FmtName 8a const D ObjName 20a const D ErrRtnData like(Qusec) /Free MsgQueue = 'TESTMSGQ TESTLIB '; Reset Qusec; CallP RtvNonpgmMsgQAttr(Qmha0100 : %len(Qmha0100) : 'RMQA0100' : MsgQueue : Qusec ); If Qusbavl <> *Zero; Dsply 'Unable to access message queue'; Else; Dsply ('Cur. size (Kb) = ' + %char(%int(QMHCS / 1024))); Dsply ('Inc. size (Kb) = ' + %char(%int(QMHIS / 1024))); Dsply ('No. increments = ' + %char(QMHNBROI)); Dsply ('Max. increments = ' + %char(QMHMI06)); EndIf; *InLr = *On; Return; /End-Free
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.