MQSeries commands
MQSeries commands
•
runmqsc < amqscos0.tst >test.out
Create
a Queue Manager
crtmqm –q qmDefault
Start
the queue manager
strmqm qmDefault
Create
a Queue
•
runmqsc (To enable MQSC commands)
•
define qlocal (‘qTest’)
•
end (To stop MQSC)
Create
a default queue manager called QMSENDER
•
crtmqm -q QMSENDER
Start
the default queue manager. Enter the following command:
•
strmqm QMSENDER
Enable
MQSC commands. Enter the following command:
•
Runmqsc
In the MQSC command window,
define a sender channel. Enter the following command:
• define channel(QMSENDER.QMRECEIVER) chltype(sdr) conname("con-name(port)")
xmitq(TRANSMITQSENDER) trptype(tcp)
Alog
•
mqConnect();// queue manager connection
•
mqOpen();// Opens the queue & browse
•
mqClose();// close the queue
•
mqDisconnect();// disconnects the queue
manager
mqConnect()
•
MQEnvironment contains static member
variables that control the environment in which an MQQueueManager object is
constructed.
•
MQEnvironment.hostname= hostName;
•
MQEnvironment.channel= channel;
•
MQEnvironment.port=
Integer.parseInt(port);
•
mqQueueManager = new MQQueueManager(qmgrName);
mqOpen()
•
openOption = MQC.MQOO_OUTPUT;
•
queue = mqQueueManager.accessQueue(qName,
openOption,null,null,null);
•
MQMessage message = new MQMessage();
•
MQPutMessageOptions pmo = new
MQPutMessageOptions();
•
queue.put(message, pmo);
mqClose
•
queue.close();
MQException
•
C:\>mqrc 2009
Tags: MQ, MQ commands, Webshpere
Subscribe to:
Post Comments (Atom)
Share your views...
0 Respones to "MQSeries commands"
Post a Comment