gpt4 book ai didi

ibm-mq - WebSphere MQ q 程序读取/写入文件

转载 作者:行者123 更新时间:2023-12-01 15:23:49 28 4
gpt4 key购买 nike

我使用以下命令将队列内容写入文件:

q -xb -ITESTQ -mTEST > messages.out

队列中有 3 条二进制消息已成功写入文件。现在我需要将相同的文件加载回队列(稍后加载相同的队列)。当我这样做时:

q -xb -oTESTQ -mTEST < messages.out

它放置了 9 条消息而不是 3 条。我猜是在加载文件时误读了格式。我注意到 q 程序中有 -X 选项。它的用途是什么?我还有哪些其他选择?

最佳答案

为此,您真的需要查看 QLoad 程序 (SupportPac MO03)。与 Q 程序的作者相同,并且是一个很好的工具。也是免费的。正如作者在手册中解释的那样:

Ever since I released my MA01 (Q Utility) SupportPac I have had periodic requests to explain how it can be used to unload, and subsequently reload, messages from a queue. The answer has always been that this is not what MA01 is for and that surely there must be a utility available. Well, after sufficient numbers of these requests I looked for a utility myself and didn’t really find anything which fitted the bill. What was needed was a very simple, some would say unsophisticated, program which unloaded a queue into a text file. The notion of a text file was important because a number of users wanted the ability to change the file once it had been created. I also find that text based files are more portable and so this seemed useful if we want to unload a queue, say on Windows, and then load the messages again on a Solaris machine. The disadvantage of this approach is that the file is larger than it would be in binary mode. Storing data using the hex representation of the character rather than the character itself essentially uses twice as much space. However, in general I do not envisage people using this program to unload vast amounts of message data but a few test messages or a few rogue messages on the dead letter queue which are then changed and reloaded elsewhere.

关于ibm-mq - WebSphere MQ q 程序读取/写入文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11802178/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com