MQSeries Functions

MQSeries Functions

MQSeries Functions

Functions Synopsis

MQSeries is the leading product in the field of messaging and queuing. It is vastly used in Banks and Pharmaceutical Industries and it has proved to be stable and reliable. FOCUS.FLL per se does not provide access to the MQSeries API: FOCUSMQS.FLL and FOCUSMQC.FLL do!

Sending a message

1.  Connect to the Queue Manager

2.  Open the target queue in “PUT” mode

3.  Send the message

4.  Close the target queue

5.  Disconnect from the Queue Manager

Reading a message

1.  Connect to the Queue Manager

2.  Open the queue for incoming message sin “GET” mode

3.  Read the message

4.  Close the queue

5.  Disconnect from the Queue Manager

There is quite some overhead while connecting/disconnecting to/from a Queue Manager. Opeing/Closing queues is faster but still creates some overhead. Therefore you might want to connect only once to the Queue Manager and open only once the queue.

Sending multiple messages

1.  Connect to the Queue Manager

2.  Open the target queue in “PUT” mode

3.  Send message1; Send message2; send message3; …

4.  Close the target queue

5.  Disconnect from the Queue Manager

Reading multiple messages

1.  Connect to the Queue Manager

2.  Open the target queue in “GET” mode

3.  Read message1; read message2; read message3; …

4.  Close the target queue

5.  Disconnect from the Queue Manager

*************

UNDER CONSTRUCTION

int FW_MQ_connect( XBASE_PARAMETERS );

int FW_MQ_open( XBASE_PARAMETERS );

int FW_MQ_openBrowse( XBASE_PARAMETERS );

int FW_MQ_put( XBASE_PARAMETERS );

int FW_MQ_get( XBASE_PARAMETERS );

int FW_MQ_getBrowse( XBASE_PARAMETERS );

int FW_MQ_close( XBASE_PARAMETERS );

int FW_MQ_disconnect( XBASE_PARAMETERS );

int FW_MQ_GetLastError( XBASE_PARAMETERS );

int FW_MQ_commit( XBASE_PARAMETERS );

int FW_MQ_inquire( XBASE_PARAMETERS );

int FW_MQ_BackOut( XBASE_PARAMETERS );

int FW_MQ_SetAttribute( XBASE_PARAMETERS );

int FW_MQ_getLastDate( XBASE_PARAMETERS );

int FW_MQ_getLastTime( XBASE_PARAMETERS );

int FW_MQ_getLastApplType( XBASE_PARAMETERS );

int FW_MQ_getLastApplName( XBASE_PARAMETERS );

*************

MQSeries Functions

MQ_close(): Closes the current queue.

Syntax

MQ_close() è nSuccess

Parameters

None.

Returns

nSuccess 0 if the current queue is successfully closed; otherwise, please refer to your MQSeries documentation.

Example

?????

MQ_connect(): Connects to the Queue Manager.

Syntax

MQ_connect( szQueueManager ) è nSuccess

Parameters

szQueueManager MQSeries Queue Manager.

Returns

nSuccess 0 if successfully connected; otherwise, please refer to your MQSeries documentation.

Example

?????

MQ_disconnect(): Disconnects from the Queue Manager.

Syntax

MQ_disconnect() è nSuccess

Parameters

None.

Returns

nSuccess 0 if successfully disconnected; otherwise, please refer to your MQSeries documentation.

Example

?????

MQ_open(): Opens a Queue.

Syntax

MQ_open( szQueue,szMode ) è nSuccess

Parameters

szQueue MQSeries Queue.

szMode opening mode of szQueue.

Value / Description
"GET" / Opens the queue in read mode
"PUT" / Opens the queue in write mode
"GET+PUT" / Opens the queue in read/write mode
Returns

nSuccess 0 if szQueue is successfully opened; otherwise, please refer to your MQSeries documentation.

Example

??????????