Hi Ashwani,

As long as PGM2 is the only program adding entries to the data queue, and the field you specify for your OtData parameter is 8192 or larger, it should not be a problem.

If some other program is adding entries, and the length of the entry that other program is adding is greater than the size of the field you specify for OtData, you might have a problem.

From https://www.ibm.com/docs/en/i/7.2?topic=ssw_ibm_i_72/apis/qrcvdtaq.htm:

*Data*
OUTPUT; CHAR(*)

A field of at least the length of the value specified for the MAXLEN
parameter on the Create Data Queue (CRTDTAQ) command. This field
contains the data received from the data queue.

*Note:*If the length of this field is larger than the size of the
message received, only the number of characters (beginning from the
left) as defined by the message received from the data queue are
changed. *If the length of this field is smaller than the value
specified for the MAXLEN parameter on the Create Data Queue
(CRTDTAQ) command, and the actual length of this field is not
specified in the size of data receiver parameter, unexpected results
can occur.*

If the length of this field is specified in the size of data
receiver parameter, the data received will be truncated if it is
longer than the size specified.

As it says, you can prevent unexpected errors like that by specifying the size of the data receiver in the optional parameter group 2 for the QRCVDTAQ api, or just make sure the size of the OTdata parameter field is the same as the max size of the dtaq entry as specified on the CRTDTAQ command.

--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx
pdow@xxxxxxxxxxxxxx

/

On 1/19/2022 8:38 AM, Singh, Ashwani (Lake Mary) via RPG400-L wrote:
Thanks Alan,

We increased the length of all Q's to 64512 for our platform modernization project.

PGM2 - is sending only 8192 data , that's all we want.

My question was will the DATA length (IN PGM1) cause any issue since it is larger than what is being received - I think no but want to see if anyone has seen any issues with that.


Thanks,
Ashwani Singh


-----Original Message-----
From: RPG400-L<rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Alan Campin
Sent: Wednesday, January 19, 2022 11:31 AM
To: RPG programming on IBM i<rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: QRCVDTAQ Question - O/P Data Parm

⚠ EXTERNAL MESSAGE – Think Before You Click



I am surprised that the API will allow you to do that but, of course. If your data is 64K in size, why are you defining the data queue to only by 8192? Anything longer than 8192 is not going to be sent.


On Wed, Jan 19, 2022 at 8:21 AM Singh, Ashwani (Lake Mary) via RPG400-L <rpg400-l@xxxxxxxxxxxxxxxxxx> wrote:

Hello,



I have a question regarding the data parameter to rule out QRCVDTAQ
involvement.



PGM 1 - Receives data with length 64512 , using a DTAQ with MAXLEN
(10240) , PGM2 which sends the data to this queue can send max 8192
Bytes only.



D QRCVDTAQ PR EXTPGM('QRCVDTAQ')

D DataQ 10 Const

D Lib 10 Const

D QLength 5P 0 Const

D OtData 64512

D Qwait 5P 0 Const



Is there any possibility that data received in PGM1 get corrupted
because of length of OTDATA > MaxLen ?



Thanks,

Ashwani Singh


--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email:RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit:
https://urldefense.com/v3/__https://lists.midrange.com/mailman/listinf
o/rpg400-l__;!!P9vvK-4S!xtGf2d8bZPyNjfQuBDGj98x0chbeSIJerri1Mk_FAd5UCZ
RY0GdCMCfIQMK2fIyB8uA$ or email:RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://urldefense.com/v3/__https://archive.midrange.com/rpg400-l__;!!P9vvK-4S!xtGf2d8bZPyNjfQuBDGj98x0chbeSIJerri1Mk_FAd5UCZRY0GdCMCfIQMK2R6K5iF8$ .

Please contactsupport@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link:
https://urldefense.com/v3/__https://amazon.midrange.com__;!!P9vvK-4S!x
tGf2d8bZPyNjfQuBDGj98x0chbeSIJerri1Mk_FAd5UCZRY0GdCMCfIQMK2FvU6Zp0$

--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email:RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:https://urldefense.com/v3/__https://lists.midrange.com/mailman/listinfo/rpg400-l__;!!P9vvK-4S!xtGf2d8bZPyNjfQuBDGj98x0chbeSIJerri1Mk_FAd5UCZRY0GdCMCfIQMK2fIyB8uA$
or email:RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives athttps://urldefense.com/v3/__https://archive.midrange.com/rpg400-l__;!!P9vvK-4S!xtGf2d8bZPyNjfQuBDGj98x0chbeSIJerri1Mk_FAd5UCZRY0GdCMCfIQMK2R6K5iF8$ .

Please contactsupport@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link:https://urldefense.com/v3/__https://amazon.midrange.com__;!!P9vvK-4S!xtGf2d8bZPyNjfQuBDGj98x0chbeSIJerri1Mk_FAd5UCZRY0GdCMCfIQMK2FvU6Zp0$

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

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