Hopefully someone can help with this as I can't seem to find the answer elsewhere.

I'm writing a COBOL routine to PUT and GET messages to an MQ queue.

The messages in question are all contained in a single file and I would like to know if the syntax of MQPUT can be used to just PUT the file or do I have to read the file and do a PUT of each individual message?

有帮助吗?

解决方案

The syntax of MQPUT API says that the message to be put is passed as buffer. The application must fill the buffer with data to be put. So you can either read the entire file to a sufficiently sized buffer and send it or read one record at a time from the file and send it. It depends on how your receiving application wants the message format to be. Can it process the whole file as one message or one record at a time.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top