开发者

Data Queue size limitation - comunication from iSeries to Java

I'm having a problem with the Data Queue object. I'm sending messages to an iSeries program (aka AS400) through a Data Queue object in Java. I can write to the iSeries and read the response but the problem is that the size of the Data Queue is defined by the size of the message that I sent previously, so, when I receive the answer, this has been truncated to the size of the request m开发者_JS百科essage and I loose information. How can I resolve this? Can anyone help me? I'm using JTOpen library.

Thanks


Regardless of how it's being created, a data queue has a "maximum entry length". This is specified on the CRTDTAQ command from CL or in the create method call if setting up the DataQueue object using JTOpen.

If you're planning to send messages of different lengths through a data queue, you need to create the data queue with a "maximum entry length" greater than or equal to your actual maximum entry length. Otherwise you risk putting something in one end and having it be truncated when it comes out the other side.

Here's the Javadoc that shows how you can create a data queue from JTOpen.


Would you be open to consider an alternative solution? The approach we used in a similar situation was to pass the content of request/response messages through user spaces (object type USRSPC on AS/400) which don't have size limitations. Well, its ~16GB if I remember correctly... Fixed size names of the user spaces, in turn, were passed through a data queue (DTAQ) between AS/400 server and Java clients.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜