Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

IBM MQ APL functions are used to send data to an IBM WebSphere MQ queue.

MQConnect

This function will open a connection to a queue and queue manager.

MQQueue mqConnect(MQQueueManagerInfo info, string queueName)      

Parameters


ParameterDescription

info

The information needed to connect to the queue manager MQQueueManagerInfo UDR. For further information about the MQQueueManagerInfo UDR type see MQQueueManagerInfo in 9.43.5 IBM MQ UDRs.

queueName

The name of the queue

Returns

Returns an MQQueue UDR. For further information about the MQQueue UDR type see MQQueue in 9.43.5 IBM MQ UDRs.


Note
titleNote!

If there is no available queue status for some reason, the MaxDepth and CurrentDepth fields will be assigned the value "-1" and the mqConnect function will still be able to connect.


MQPut

This function will put a message on a queue.

...

string mqPut(MQQueue queue, MQMessage message)      

Parameters


ParameterDescription

queue

The MQQueue UDR that is the result from the mqConnect function. For further information about the MQQueue UDR type see MQQueue in 9.43.5 IBM MQ UDRs

message

The message to add to the queue. For further information about the MQMessage UDR type see MQMessage in 9.43.5 IBM MQ UDRs.

Returns

Returns null if the function was successful and an error message if it failed.


MQClose

This function closes the connection to the queue manager.

...

string mqClose(MQQueue queue)

Parameters


ParameterDescription

queue

The MQQueue UDR that is the result from the mqConnect function. For further information about the MQQueue UDR type see MQQueue in 9.43.5 IBM MQ UDRs.

Returns

Returns null if the function was successful and an error message if it failed.


MQStatus

This function will query the queue for MaxDepth and CurrentDepth and populate the corresponding fields in the MQQueue UDR.

...

string mqStatus(MQQueue queue) 

Parameters


ParameterDescription

queue

The MQQueue UDR that is the result from the mqConnect function. For further information about the MQQueue UDR type see MQQueue in 9.43.5 IBM MQ UDRs.

Returns

Returns an error message describing the problem, or null if the function was successful.


Scroll ignore
scroll-viewportfalse
scroll-pdftrue
scroll-officefalse
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmlfalse


Next: