Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
IBM WebSphere MQMQiSeriesLinux - set upMQ iSeries to Windows/LinuxFrederick James Rathweg Owner / Island Macro Systems, In...
MQ iSeries to Windows/Linux - set up• Connect two MQ queue managers together so that messages can be  sent between them.• ...
MQ iSeries Deciding on a connection- set up • For TCP, a host address may be used, each distributed service is   allocated...
Configuration parameters for an LU 6.2 connection    SNA Configuration on the iSeries    ID       Parameter Name          ...
Explanation of parameters for an LU 6.2 connection• 123 use command DSPNETA.• 4     LAN destination address You can find t...
Establishing an LU 6.2 connection - local• To display the current network attributes enter the command  DSPNETA, to change...
Configuration parameters for an LU 6.2 connection• Connection to a Linux (x86 platform) system ID      Parameter Name     ...
Configuration parameters for an LU 6.2 connection• Connection to a Windows system ID      Parameter Name               Ref...
LU 6.2 connection to partner node• CRTCTLAPPC Controller description (12), set Link type: *LAN, Online at  IPL: *NO. Enter...
Establishing a TCP connectionIf TCP is already configured there is no configuration, else• Use ADDTCPIFC to enter this mac...
WebSphere MQ for iSeries configuration• Start the TCP channel listener STRMQMLSR.• Start sender: STRMQMCHL CHLNAME(channel...
MQ for iSeries Basic configuration     • First create a queue manager CRTMQM (Enter).     • Message Queue Manager name: AS...
Configuration WebSphere MQ for iSeries to Windows • Local node- Queue Manager Name: AS400,   Local queue name: AS400.LOCAL...
Configuration WebSphere MQ for iSeries to Linux • Local node- Queue Manager Name: AS400,   Local queue name: AS400.LOCALQ ...
MQiSeriesLinux - function for WebSphere MQ for iSeries message channel example             In the light you are able to se...
Queue manager QM1 example                                                YAMAS• QM1: Remote queue definition CRTMQMQ:QNAME...
Queue manager QM1 example                                          YAMAS• Sender channel definition CRTMQMCHLCHLNAME QM1.T...
Queue manager QM2 example                                                 YAMAS• QM2: Remote queue definition CRTMQMQ:QNAM...
Queue manager QM2 example                                         YAMAS• Sender channel definition CRTMQMCHLCHLNAME QM2.TO...
Running the example                      NIYAMAS When you have created the required objects, you must: 3.Start the channel...
Expanding this example                            NIYAMAS  This example can be expanded by:  • Adding more queue and chann...
Programming with WebSphere MQ                                    NIYAMAS • The MQI API is designed as a simple call interf...
Queue managers and the MQI                                               NIYAMAS There are eight major calls in the MQI: •...
Operator commands                                                            sat/asatChannel commandsCHG, CPY, CRT, DLT, D...
Thank YouFrederick James RathwegOwner / Island Macro Systems, Inc.                                     islandmacro@hotmail...
Programming with WebSphere MQ  he MQI API is designed as a simple call interface with a  limited number of calls and a ric...
Upcoming SlideShare
Loading in …5
×

M Qi Series Linux

952 views

Published on

  • Be the first to comment

M Qi Series Linux

  1. 1. IBM WebSphere MQMQiSeriesLinux - set upMQ iSeries to Windows/LinuxFrederick James Rathweg Owner / Island Macro Systems, Inc. islandmacro@hotmail.com © 2012IBM Corporation © 2009
  2. 2. MQ iSeries to Windows/Linux - set up• Connect two MQ queue managers together so that messages can be sent between them.• Preparations needed to allow an application using queue manager QM1 to put messages on a queue at queue manager QM2.• An application running on QM2 can retrieve these messages, and send responses to a reply queue on QM1.Corporate karma empowers the human willfor good 。 2 islandmacro@hotmail.com © 2012
  3. 3. MQ iSeries Deciding on a connection- set up • For TCP, a host address may be used, each distributed service is allocated a unique TCP address which may be used by remote machines to access the service. • The TCP address consists of a host name/number and a port number. All queue managers will use such a number to communicate with each other via TCP. SNA (LU 6.2) requires definition of anSNA logical unit type 6.2 (LU 6.2) thatprovides the physical link between theiSeries (serving the local queue manager) and the system serving the remotequeue manager.Corporate karma empowers the human will for the achievement of greatness. 3 islandmacro@hotmail.com © 2012
  4. 4. Configuration parameters for an LU 6.2 connection SNA Configuration on the iSeries ID Parameter Name Reference Example Use User Value 1 Local network ID NETID 2 Local control point name AS400PU 3 LU name AS400LU 4 LAN destination address 10005A5962EF 5 Subsystem description QCMN 6 Line description TOKENRINGL 7 Resource name LIN041 8 Local Transaction Program name MQSERIESCorporate karma is a guide for success and for a positive, dynamic, rich, triumphant and joyouscareer. 4 islandmacro@hotmail.com © 2012
  5. 5. Explanation of parameters for an LU 6.2 connection• 123 use command DSPNETA.• 4 LAN destination address You can find the value using the command DSPLIND Line description (6).• 5 Subsystem description• 6 Line description If this has been specified it is indicated in the• 7 Resource name• 8 Local Transaction Program name For simplicity, wherever possible use a transaction program name of MQSERIES. Corporate karma is a guide for success and for a dynamic, rich, and triumphant career. 5 islandmacro@hotmail.com © 2012
  6. 6. Establishing an LU 6.2 connection - local• To display the current network attributes enter the command DSPNETA, to change CHGNETA.• To display the Resource name, Type WRKHDWRSC TYPE(*CMN) and press Enter.• If the line description (6) has not already been created use CRTLINTRN and resource name (7).• Enter ADDRTGE - Subsystem description (5), Compare value (8), Starting position, Program to call.• STRSBS subsystem description (5) and press Enter 6 islandmacro@hotmail.com © 2012
  7. 7. Configuration parameters for an LU 6.2 connection• Connection to a Linux (x86 platform) system ID Parameter Name Reference Example Use User Value 9 Network ID 4 NETID 10 Control point name 2 LINUXPU 11 LU name 5 LINUXLU 12 Controller description LINUXPU 13 Device LINUXLU 14 Side information LXCPIC 15 Transaction Program 7 MQSERIES 16 LAN adapter address 8 08005AC6DF33 17 Mode 6 #INTER Corporate karma is a guide for success and for a positive and joyous career. 7 islandmacro@hotmail.com © 2012
  8. 8. Configuration parameters for an LU 6.2 connection• Connection to a Windows system ID Parameter Name Reference Example Use User Value 9 Network ID 2 NETID 10 Control point name 3 WINNTCP 11 LU name 5 WINNTLU 12 Controller description WINNTCP 13 Device WINNTLU 14 Side information NTCPIC 15 Transaction Program 7 MQSERIES 16 LAN adapter address 9 08005AA5FAB9 17 Mode 17 #INTER Corporate karma is a guide for success and for a positive and joyous career. 8 islandmacro@hotmail.com © 2012
  9. 9. LU 6.2 connection to partner node• CRTCTLAPPC Controller description (12), set Link type: *LAN, Online at IPL: *NO. Enter twice, followed by F10. Switched line list (6), Remote network identifier (9), Remote control point (10), and LAN remote adapter address (16). Enter.• CRTDEVAPPC Device description (13), Remote location (11), Local location (3), Remote network identifier (9), and Attached controller (12).• CRTCSI (F10) Side information (14), Remote location (11), Transaction program (15), Local location (3), Mode, Remote network identifier (9).• ADDCMNE Subsystem description (5) and Device (13),• ADDCFGLE *APPNRMT (F4) Remote location name (11), Remote network identifier (9), Local location name (3), Remote control point (10), and Control point net ID (9). As part of this cosmic stream, expect the unexpected. 9 islandmacro@hotmail.com © 2012
  10. 10. Establishing a TCP connectionIf TCP is already configured there is no configuration, else• Use ADDTCPIFC to enter this machine’s Internet address and Line description, and a Subnet mask.• TCP/IP loopback ADDTCPIFC Internet address 127.0.0.1, Line description, and Subnet mask 255.0.0.0• ADDTCPRTE Enter to create a default route entry.In this fast-moving, eternally dynamic, ever-changing universe, there is nothing unmoving. 10 islandmacro@hotmail.com © 2012
  11. 11. WebSphere MQ for iSeries configuration• Start the TCP channel listener STRMQMLSR.• Start sender: STRMQMCHL CHLNAME(channel_name).• WRKMQMQ display the WebSphere MQ configuration menu. 11 islandmacro@hotmail.com © 2012
  12. 12. MQ for iSeries Basic configuration • First create a queue manager CRTMQM (Enter). • Message Queue Manager name: AS400. Undelivered message queue: DEAD.LETTER.QUEUE. • Start queue manager: STRMQM MQMNAME(AS400). • Create the undelivered message queue,CRTMQMQ Local Queue Queue name : DEAD.LETTER.QUEUE Queue type : *LCLThe best way to learn and study is to be on the same wavelength, then meaning is transmitted fromheart to heart. 12 islandmacro@hotmail.com © 2012
  13. 13. Configuration WebSphere MQ for iSeries to Windows • Local node- Queue Manager Name: AS400, Local queue name: AS400.LOCALQ • Connection MQ for Windows Remote queue manager name (A) WINNT Remote queue: WINNT.REMOTEQ Queue name remote(B ): WINNT.LOCALQ Transmission queue: WINNT Sender (SNA) channel: AS400.WINNT.SNA (TCP/IP) : AS400.WINNT.TCP Receiver (SNA) channel: WINNT.AS400.SNA (TCP/IP): WINNT.AS400.TCPThe cosmic stream. You don’t know what is coming. 13 islandmacro@hotmail.com © 2012
  14. 14. Configuration WebSphere MQ for iSeries to Linux • Local node- Queue Manager Name: AS400, Local queue name: AS400.LOCALQ • Connection MQ for Linux Remote queue manager name (A) LINUX ender (SNA) channel: AS400.LINUX.SNA Remote queue: LINUX.REMOTEQ Queue name remote (B ): LINUX.LOCALQ (TCP/IP) : AS400.LINUX.TCP Transmission queue: LINUX eceiver (SNA) channel: LINUX.AS400.SNA (TCP/IP): LINUX.AS400.TCPThe cosmic stream. You don’t know what is coming. 14 islandmacro@hotmail.com © 2012
  15. 15. MQiSeriesLinux - function for WebSphere MQ for iSeries message channel example In the light you are able to see, 15 islandmacro@hotmail.com © 2012
  16. 16. Queue manager QM1 example YAMAS• QM1: Remote queue definition CRTMQMQ:QNAME ‘PAYROLL.QUERY’QTYPE *RMTTEXT ‘Remote queue for QM2’PUTENBL *YESTMQNAME ‘QM2’ (default = remote queue manager name)RMTQNAME ‘PAYROLL’ RMTMQMNAME ‘QM2’• QM1: Transmission queue definition CRTMQMQ:QNAME QM2QTYPE *LCLTEXT ‘Transmission queue to QM2’USAGE *TMQ PUTENBL *YESGETENBL *YES TRGENBL *YESTRGTYPE *FIRSTINITQNAME SYSTEM.CHANNEL.INITQTRIGDATA QM1.TO.QM2When the first message is put on this transmission queue, a trigger message is sent to the initiation queue, SYSTEM.CHANNEL.INITQ. The channel initiator gets the message from the initiation queue and starts the channel identified in the named process. Ahimsa (अििसा ): not causing pain in thought, word, or deed. 16 islandmacro@hotmail.com © 2012
  17. 17. Queue manager QM1 example YAMAS• Sender channel definition CRTMQMCHLCHLNAME QM1.TO.QM2CHL TYPE *SDR TRPTYPE *TCPTEXT ‘Sender channel to QM2’TMQNAME QM2CONNAME ‘9.20.9.32(1412)’• Receiver channel definition CRTMQMCHLCHLNAME QM2.TO.QM1CHLTYPE *RCVRTRPTYPE *TCPTEXT ‘Receiver channel from QM2’• Reply-to queue definition CRTMQMQQNAME PAYROLL.REPLYQTYPE *LCL TEXT ‘Reply queue for replies to query messages sent to QM2’PUTENBL *YESGETENBL *YES Satya (सतय ): truthfulness, in word and thought. 17 islandmacro@hotmail.com © 2012
  18. 18. Queue manager QM2 example YAMAS• QM2: Remote queue definition CRTMQMQ:QNAME PAYROLLQTYPE *LCLTEXT ‘Local queue for QM1 payroll details’PUTENBL *YESGETENBL *YES’• QM2: Transmission queue definition CRTMQMQ:QNAME QM1QTYPE *LCLTEXT ‘Transmission queue to QM1’USAGE *TMQPUTENBL *YESGETENBL *YESTRGENBL *YESTRGTYPE *FIRSTINITQNAME SYSTEM.CHANNEL.INITQTRIGDATA QM2.TO.QM1 Asteya (असतेय): non-stealing, non-coveting, non-entering into debt. 18 islandmacro@hotmail.com © 2012
  19. 19. Queue manager QM2 example YAMAS• Sender channel definition CRTMQMCHLCHLNAME QM2.TO.QM1CHLTYPE *SDRTRPTYPE *TCPTEXT ‘Sender channel to QM1’TMQNAME QM1CONNAME ‘9.20.9.31(1411)’• Reply-to queue definition CRTMQMQCHLNAME QM1.TO.QM2CHLTYPE *RCVRTRPTYPE *TCPTEXT ‘Receiver channel from QM1’Brahmacharya (बहचयय ): celibate when single, faithful when married. 19 islandmacro@hotmail.com © 2012
  20. 20. Running the example NIYAMAS When you have created the required objects, you must: 3.Start the channel initiator for both queue managers 4.Start the listener for both queue managers 5.Then the applications can then send messages to each other. 6.Channels are triggered to start by the first message arriving on each transmission queue, so you do not need to issue the STRMQMCHL command.• Shaucha: under Yamas; means purity. Yamas 20 islandmacro@hotmail.com © 2012
  21. 21. Expanding this example NIYAMAS This example can be expanded by: • Adding more queue and channel definitions to allow other applications to send messages between the two queue managers. •Adding user exit programs on the channels to allow for link encryption, security checking, or additional message processing. •Using queue manager aliases and reply-to queue aliases to understand more about how these can be used in the organization of your queue manager network.• Santosha: contentment. Santosha 21 islandmacro@hotmail.com © 2012
  22. 22. Programming with WebSphere MQ NIYAMAS • The MQI API is designed as a simple call interface with a limited number of calls and a rich set of options for each call. • However, sensible default and initial values for the options ensure that it is easy and quick to get applications up and running. • The WebSphere MQ Application Programming Reference defines the MQI, and uses a language-independent notation to describe each call and its parameters. 22 : austerity. islandmacro@hotmail.com © 2012
  23. 23. Queue managers and the MQI NIYAMAS There are eight major calls in the MQI: • MQOPEN - open a queue for access • MQCLOSE - close a queue for access • MQPUT- put a message on a queue • MQGET - get a message from a queue • MQPUT1 - open a queue, put a message on it, then close the queue • MQOPEN - open a queue for access • MQCLOSE - close a queue for access • MQPUT- put a message on a queue • MQGET - get a message from a queue • MQPUT1 - open a queue, put a message on it, then close the queue There are five minor calls in the MQI: • MQBEGIN - begin a unit of work • MQCMIT - commit a unit of work • MQBACK - rollback a unit of work • MQINQ - inquire on the attributes of a WebSphere MQ object (a queue is an example of a WebSphere MQ object; a queue manager is another example) • MQSET - set the attributes of a WebSphere MQ object • Svādhyāya: self-study or study of spiritual scriptures. 23 islandmacro@hotmail.com © 2012
  24. 24. Operator commands sat/asatChannel commandsCHG, CPY, CRT, DLT, DSP, END, PNG,RST, RSV, STR, Namelist commandsWRK CHG, CPY, CRT, DLT, DSP, WRK…MQM Channel …MQMNL, MQM NamelistsENDMQMLSR, End MQM Listener Process commandsSTRMQMCHLI, Start MQM Channel Initiator CHG, CPY, CRT, DLT, DSP , WRKSTRMQMLSR, Start MQM Listener … MQMPRC, (MQM Processes)WRKMQMCHST, Work with MQM Channel Status Queue commandsCluster commands CHG, CPY, CLR, CRT, DLT, DSP, WRKRFR, RST, WRK …MQMQ, MQM Queue…MQMCL, Work with Clusters WRKMQMMSG, Work with MQM MessagesRSM, SPD Queue Manager commands… MQMCLQM, Resume Cluster Queue Manager CCT, CHG, CRT, DLT, DSC, DSP, END, STR, WRKCommand Server commands … MQM, Message Queue managersDSP ,END, STR …MQMCSVR, MQM Command Server Security commands DSP, GRT, RVKCVTMQMDTA, Convert MQM Data Type Command …MQMAUT, MQM Object AuthoritySTRMQMDLQ, Start MQ Dead-Letter Queue HandlerRCDMQMIMG, Record MQM Object Image TRCMQM, Trace MQM JobRCRMQMOBJ, Recreate MQM Object RSVMQMTRN, Resolve MQSeries® TransactionSTRMQMMQSC, Start MQSC Commands WRKMQMTRN, Display MQSeries TransactionDSPMQMOBJN, Display MQM Object NamesSTRMQMTRM, Start Trigger Monitorasato ma satgamaya - Lead me from asat to the satAsat means non-existence, non-reality and untruth 24 islandmacro@hotmail.com © 2012
  25. 25. Thank YouFrederick James RathwegOwner / Island Macro Systems, Inc. islandmacro@hotmail.com © 2012IBM Corporation © 2009
  26. 26. Programming with WebSphere MQ he MQI API is designed as a simple call interface with a limited number of calls and a rich set of options for each call. owever, sensible default and initial values for the options ensure that it is easy and quick to get applications up and running. he WebSphere MQ Application Programming Reference defines the MQI, and uses a language-independent notation to describe each call and its parameters.• tamaso ma jyotir gamaya (from darkness to light) 26 islandmacro@hotmail.com © 2012

×