× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Good point Barb.

But, if he was initiating it to the length of the receiver, wouldn't he
do:
>      D dqLen           s              5  0 inz(%len(dqData))
>      D dqData          s          10000
:-)

Rob Berendt
--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
Benjamin Franklin




Barbara Morris <bmorris@ca.ibm.com>
Sent by: rpg400-l-admin@midrange.com
07/24/2002 02:45 PM
Please respond to rpg400-l


        To:     rpg400-l@midrange.com
        cc:
        Fax to:
        Subject:        Re: QRCVDTAQ (Receive Data Queue) program


"Bartell, Aaron L. (TC)" wrote:
> ...
>
>      D dqName          s             10    inz('JMDTAQ')
>      D dqLib           s             10    inz('QGPL')
>      D dqLen           s              5  0 inz(10000)
>      D dqData          s          10000
>      D dqWait          s              5  0 inz(5)
> ...
>      C     $qRcvDtaQ     begsr
>      C                   call      'QRCVDTAQ'
>      C                   parm                    dqName
>      C                   parm                    dqLib
>      C                   parm                    dqLen
>      C                   parm                    dqData
>      C                   parm                    dqWait
> ...

Aaron, just a warning about this API: the third (length) parameter isn't
a way for you to tell the API how big your receiver is.  It's a way for
the API to tell you how long the entry is.  The API assumes your
receiver is big enough (there's an optional parameter, something like
parm 12, that allows you to give your buffer length).  If dqData isn't
at least as big as your data-queue maximum, you could have a
storage-corruption problem.

Maybe your code is ok - the reason I suspect you have a misunderstanding
about that parm is that you have initialized the length parm to the
length of the buffer.

(I always go on alert when I see this API as the subject in a forum.
Not so much lately, but MCH3601 and MCH0601 due to misuse of this API
used to be a very commonly reported problem in forums and in PMRs.)






As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.