Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

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 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 IBM MQ UDRs.

Note!

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.

If the function fails, it will populate the ErrorDescription field with a description and set isError to true. If the error was generated from an MQ exception it will also update the MqError field in the MQQueue UDR.

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 IBM MQ UDRs

message

The message to add to the queue. For further information about the MQMessage UDR type see MQMessage in 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.

If the function fails, it will populate the ErrorDescription field with a description and set isError to true. If the error was generated from an MQ exception it will also update the MqError field in the MQQueue UDR.

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 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.

If the function fails, it will populate the ErrorDescription field with a description and set isError to true. If the error was generated from an MQ exception it will also update the MqError field 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 IBM MQ UDRs.

Returns

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

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.