Step 7: Disconnecting from the queue
When a program that has connected to a queue manager has finished all interaction with the queue, it must break the connection.
Sample Application 1
| rc |
"Sample App 1: Disconnecting from the queue manager established
in step 1 and verifying the disconnect"
(rc := aQueueManager disconnect) isAbtError
ifTrue: [CICSTTY cr;
show: 'Disconnect from Queue Manager failed with return code: ',
(aQueueManager lastError codesAsString)]
ifFalse: [CICSTTY cr;
show: 'Disconnect to Queue Manager ', (self queueManagerName),
' is OK.'].
Note:
You can close a queue and disconnect from the queue manager in a single step by using the disconnect method of AbtMQqueue. This is useful if you are using only one queue.
The connection obtained using the connection spec in Sample Application 2 must also be disconnected:
Sample Application 2
| result |
"Sample App 2: Disconnecting the connection obtained in steps 1 and 2
and verifying the disconnect"
(result := anMQConnection disconnect) isAbtError
ifTrue: [Transcript cr;
nextPutAll: ('Disconnect error: ', result codesAsString)].
Last modified date: 01/29/2015