Websphere MQ Installation
Websphere MQ Installation
WebSphere
MQ.
This lab /as /ritten /ith WMQ 7.'.&.8. -0t the exercise in this lab sh#0ld als# /#rk /ith *#rer #r
later WMQ Versi#n. ,t c#0ld #nl! the #ne #r #ther screen appearance l##ks di**erent.
1$. %pr. &''( )age & #* +1
Table of Contents
%b#0t WebSphere MQ ......................................................................................................................... &
9ab ,ntr#d0cti#n................................................................................................................................ &
9ab 15 WebSphere MQ ,nstallati#n....................................................................................................... +
9ab &5 Create WebSphere MQ #b2ects................................................................................................ 11
9ab 85 6se the WebSphere MQ %), Exerciser t# p0t and get data int# a 40e0e................................ 17
9ab +5 WebSphere MQ interc#0nicati#n set0p............................................................................. &&
C#plete QM% c#n*ig0rati#n *#r interc#0nicati#n.................................................................. &8
Create Q0e0e Manager QM- and its #b2ects /ith the WMQ c#and line inter*ace.................. &:
9ab ;5 Test the WebSphere MQ interc#0nicati#n......................................................................... 8&
)0t a essage #n the re#te 40e0e 0sing the WMQ Expl#rer....................................................... 88
)0t a essage #n the re#te 40e0e 0sing the WMQ %), Exerciser /ith %d1anced #pti#ns.........8;
S0ar! and #re ,n*#rati#ns........................................................................................................ +1
1$. %pr. &''( )age 8 #* +1
Lab 1: WebSphere MQ Installation
G#al #* this lab5
,nstall WebSphere MQ as a base *#r the *#ll#/ing labs.
,* !#0 ha1e WMQ alread! installed3 skip this lab and c#ntin0e /ith lab &.
T# r0n this WebSphere MQ Exercise /ith#0t a )r#d0ct 9icenses #r C<3 0se the :' da!s Trial
Versi#n *r# here5
http5==///1+.s#*t/are.ib.c#=/ebapp=d#/nl#ad=search40er!.2sp
>a? Check the S!ste re40ireents be*#re installati#n.
The! can be *#0nd here5 http5==///@
8'7.ib.c#=s#*t/are=integrati#n=/4=re40ireents=index.htlASBCM)Crna1
>b? Start set0p.exe t# la0nch the installati#n. The *#ll#/ing installati#n /ind#/ sh#0ld appear.
>c? Click #n Software Requirements #n the le*t side t# check the S#*t/are prere40isites.
1$. %pr. &''( )age + #* +1
>d? %*ter that /e 0se the WebSphere Eclipse )lat*#r as graphical 0ser inter*ace t# create the
WMQ Db2ects. There*#re install WebSphere Eclipse Platform Version 3.0.1, i* n#t
alread! installed3 b! clicking Install from ! R"#.
1$. %pr. &''( )age ; #* +1
>e? Click $etwor% onfi&uration #n the le*t side.
F#r #0r exercise3 select No.
Note:
$o eans !#0 ha1e *0ll %dinistrat#r rights #n !#0r achine and the WMQ Gr#0ps are
created #n !#0r l#cal achine. 'es eans !#0 are in a Wind#/ <#ain and !#0 ha1e
%dinistrat#r rights t# create necessar! WMQ gr#0ps like 4. This is ip#rtant *#r a
pr#d0cti#n en1ir#nent. -0t t# keep it siple *#r this exercise3 select $o.
>*? E#/ click WebSphere #( Installation #n the le*t side.
1$. %pr. &''( )age 7 #* +1
>g? Click )aunch I*# WebSphere #( Installer t# start the installati#n.
>h? Select +ccept the terms in the license a&reement and click $e,t -
1$. %pr. &''( )age $ #* +1
>i? F#0 can ch##se bet/een T!pical3 C#pact and C0st# installati#n.
F#r this exercise T!pical sh#0ld s0**icient. The installati#n path /ill be
C:\Program Files\IBM\WebSphere MQG
T# change the installati#n path #r t# add additi#nal c#p#nents like .ile /ransfer #r 0a1a
E,ten2e2 /ransaction Support3 select ustom ,nstallati#n.
,* desired3 change the installati#n path t# e.g. C:\WMQ6 and accept the #ther rec#ended
path b! clicking $e,t - .
>2? Dn the Feat0res /ind#/3 !#0 can add additi#nal *eat0res like Ser1er .ile /ransfer i*
desired. -0t the! are n#t re40ired #r 0sed in the *#ll#/ing lab. Selecting all re40ires ab#0t
&';8M- <isk Space.
1$. %pr. &''( )age ( #* +1
>k? Click Install #n the *#ll#/ing Rea23 to Install WebSphere #( screen.
>l? E#/ the installati#n is started. ,t takes se1eral in0tes. Click .inish #n the *#ll#/ing screen.
1$. %pr. &''( )age : #* +1
>? Click $e,t - #n the *#ll#/ing three screens lea1ing the 0nchanged and click .inish #n the
last #ne.
Note:
%*ter the c#p! and registrati#n #* WebSphere MQ3 !#0 can ch##se t# start a de*a0lt
c#n*ig0rati#n. % de*a0lt c#n*ig0rati#n creates a *irst Q0e0e Manager /ith a l#ng nae
c#ntaining the h#st nae. ,tHs n#t necessar! t# select Setup the !efault onfi&uration,
beca0se /e /ill create and 0se #0r #/n Q0e0e Manager in the next lab.
Note:
W#rking /ith S#*t/are )r#d0cts3 itHs al/a!s ad1isable t# check the )r#d0kt S0pp#rt )age *#r
rec#ended ser1ice #r *ix packs5
http5==///@1.ib.c#=s0pp#rt=d#c1ie/./ssArsC1$1I0idCs/g&$''7'8$J1
%t the lab creati#n tie3 Fix )ack 7.'.&.&. is the recent 1ersi#n. T# 0se it3 d#/nl#ad and start
it. %t this tie3 the exec0table is called WebSphereMQM<V7.'.&.&En6s.exe. Click $e,t
and *inall! start installati#n thr#0gh the *#ll#/ing screens. This installati#n take a /hile.
4 on&ratulation, 3ou ha1e successful installe2 WebSphere #( 4
1$. %pr. &''( )age 1' #* +1
Lab 2: Create WebSphere MQ objects
G#al #* this lab5
)articipants /ill create 1ari#0s WebSphere MQ #b2ects 0sing the WebSphere MQ Expl#rer.
<0ring these labs it is ass0ed3 that WMQ is alread! installed and c#n*ig0red3 #ther/ise c#ntin0e
/ith lab 1. K#/e1er3 /e /ill d# s#e checks3 /hich are als# part #* the adinistrati#n tasks related
t# WMQ. The de*a0lt installati#n path is C:\Program Files\IBM\WebSphere MQG. ,n the *#ll#/ing
labs3 it is ass0ed that !#0 ha1e changed this de*a0lt installati#n path C:\WMQ6G.
>a? Check i* the WMQ Ser1ice is 0p and r0nning. Click Start 4- ontrol Panel 4 4-
+2ministrati1e /ools 4- Ser1ices t# start the pr#gra. ,t sh#/s the stat0s and additi#nal
in*#rati#n ab#0t all registered Wind#/s Ser1ices. 9##k *#r the ser1ice LI*# #(SeriesM and
c#n*ir that it is LStartedM. ,* that is n#t s#3 start the ser1ice an0all!.
>b? E#/ start the WebSphere MQ Expl#rer 1ia Start 4- +ll Pro&rams 4- I*# WebSphere #( 4-
WebSphere #( E,plorer. The Expl#rer G6, has a c##n l##k5 hierarch! and #b2ects #n the
le*t sideN details #* the act0al #b2ect #n the ain /ind#/ #n the right. -0t c0rrentl!3 /e ha1e n#
#b2ects created.
>c? Create a Q0e0e Manager
Note:
T# exchange essages #r data 1ia WMQ3 /e need queues t# p0t and get the. T# create
40e0es3 /e need a queue manager. S# the *irst step is t# create a 40e0e anager and then the
40e0es. Dnl! the WebSphere MQ Ser1er Versi#n can ha1e Q0e0e Managers and Q0e0es. %
WebSphere MQ Client Versi#n cann#t anage theses #b2ects. ,t can #nl! access #nce existing
#n a WebSphere MQ Ser1er.
T# create a Q0e0e Manager3 right click (ueue #ana&ers #n the le*t /ind#/ in the WMQ
expl#rer. Click Ne @O Queue Manager...
1$. %pr. &''( )age 11 #* +1
>d? Enter QM! aka (ueue mana&er name and click $e,t -
>e? Click $e,t - #n the *#ll#/ing screen.
Note:
The next screen sh#0ld be changed int# a pr#d0cti#n s!ste t# /rite the l#g #n an#ther ph!sical
disk. This direct#r! ha1e t# be created be*#re. ,* !#0 plan t# exchange larger essages3 !#0
sh#0ld increase the 9#g *ile siPe. This can n#t be changed #n an existing Q0e0e Manager
a*ter/ards.
F#r this exercise /e d#nHt need t# change it3 s# lea1e the de*a0lts.
1$. %pr. &''( )age 1& #* +1
>*? Click $e,t - #n the next screen.
>g? Dn the next screen3 !#0 see the settings *#r listener. The p#rt n0ber 0st be 0ni40e *#r each
40e0e anager. The de*a0lt is 1+1+.
Enter "#"$ as p#rt n0ber. The next 40e0e anager QM- in this lab /ill be 1+17.
Click .inish t# create the 40e0e anager.
%*ter creating the 40e0e anager3 it sh#0ld be 1isible #n the le*t side in the MQ Expl#rer.
1$. %pr. &''( )age 18 #* +1
>h? Click the pl0s #n the le*t #* the 40e0e anager QM% t# #pen the tree. Right click Q0e0es and
select $ew 4- )ocal (ueue...
N#te5
+ )ocal (0e0e is a l#cal ph!sical 40e0e. +n +lias (0e0e is c#parable t# a p#inter t# an
existing 9#cal Q0e0e. Ver! 0se*0l i* !#0 ha1e t# change a ph!sical 40e0e nae and !#0 /ant t#
lea1e !#0r applicati#n 0nchanged. + #o2el (0e0e is like a 40e0e teplate. ,* !#0 ha1e t#
create se1eral 40e0es /ith al#st the sae setting3 !#0 can create a M#del Q0e0e and the next
9#cal Q0eues %S this M#del Q0e0e. + Remote (ueue !efiniti#n is like an %lias Q0e0e t# a
re#te 40e0e. %pplicati#n can access and send essages t# this 40e0e as t# a l#cal 40e0e. The
pr#perties #* this 40e0e c#ntains the 40e0e anager and the 40e0e nae #* a l#cal 40e0e #n a
re#te s!ste.
1$. %pr. &''( )age 1+ #* +1
>i? Enter Q%! *#r l#cal 40e0e nae and click .inish.
4 .inish lab 6 4
1$. %pr. &''( )age 1; #* +1
Lab 3: Use the WebSphere MQ API Eerciser to put an! "et
!ata into a #ueue
G#al #* this lab5
)0t and Get essages in WMQ 0sing the WebSphere MQ %), Exerciser
Note:
WMQ has se1eral %),Hs t# exchange essages bet/een applicati#ns. % essage can be an! kind #*
data. ,t c#0ld be a QM9 essages3 SD%) essage3 2peg3 1ide# strea #r an! #ther kind #* bit
streas. The #ther applicati#n can be #n an #ther s!ste and #perati#n s!ste3 c#nnected /ith
WMQ thr#0gh se1eral c#0nicati#n pr#t#c#ls like TC)=,). K#/ t# c#nnect t/# 40e0e anagers
/ill be sh#/n in the next lab.
This lab sh#/s h#/ t# /rite and read essages int# a 40e0e. T# /rite a essage int# a 40e0e3 !#0
0se the WMQ %), MQ)6T. T# read a essage *r# a Q0e0e3 !#0 0se the WMQ %), MQGET. S#
/e 0se the WMQ terin#l#gie p0t and get in the *#ll#/ing descripti#n.
K#/ t# /rite #r p0t a essage int# a 40e0e and read #r get essages *r# a 40e0e /ill be sh#/n in
this lab. WMQ pr#1ides 18 %),Hs t# access WMQ in se1eral lang0ages like Ra1a3 C3 CSS3 ... .
T# test WMQ and a1#id t# /rite and c#pile !#0r #/n applicati#n3 WMQ pr#1ides a graphical 0ser
inter*ace t# r0n these %),Hs. This pr#gra is naed WebSphere #( +PI E,erciser and can be
*#0nd in the Tinstallati#nr##tOGbin direct#r! as amqapi.e,e
>a? Start the WebSphere MQ %), Exerciser.
1$. %pr. &''( )age 17 #* +1
Note:
These are the 18 WMQ %),Hs
MQCDEE c#nnect t# a Q0e0e Manager
MQCDEEQ @ c#nnect t# a Q0e0e Manager extended /ith #re c#nnecti#n paraeters
MQ<,SU disc#nnect *r# the Q0e0e Manager
MQD)EE #pen a Q0e0e
MQC9DSE cl#se a Q0e0e
MQ)6T p0t a essage #n a Q0e0e
MQGET get a essage *r# a Q0e0e
MQ)6T1 #pen a Q0e0e3 p0t a essage and cl#se the 40e0e /ith #n %),
MQ,EQ @ get the attrib0tes #* a WMQ #b2ect
MQSET @ set the attrib0tes #* a WMQ #b2ect
*#r Transacti#ns5
MQ-EG,E @ begin transacti#n
MQCM,T @ c#it transacti#n
MQ-%CU @ r#ll back transacti#n
T# p0t a essage int# a Q0e0e3 !#0 *irst ha1e t# c#nnect t# a Q0e0e Manager3 #pen a Q0e0e
/here !#0 /ant t# p0t the essage and *inall! p0t the essage. There*#re !#0 ha1e t#
la0nch MQCDEE3 MQD)EE and then the MQ)6T c#and.
>b? T# c#nnect t# the Q0e0e Manager (#+ click #("$$.
1$. %pr. &''( )age 1$ #* +1
>c? Ens0re C#pleti#n C#de MQCCBDU in the Stat0s /ind#/ at the b#tt#.
>d? S/itch t# the Q0e0es tab3 ch##se Q9% as Selected Q0e0e and click MQD)EE.
Check the #pen Stat0s.
>e? Click MQ)6T t# p0t a essage #n the selected 40e0e Q9%. ,n the *#ll#/ing p#p@0p
/ind#/3 enter an! text like HM! TestH and click DU.
1$. %pr. &''( )age 1( #* +1
>*? T# see the n0ber #* essages in a 40e0e3 s/itch t# the MQ Expl#rer.
Select (ueues #n the le*t side. The existing 40e0es are sh#/n #n the right side.
,n the c#l0n Current queue &epth sh#0ld be a 1 *#r #ne essage in the 40e0e Q9%.
>g? T# see the c#ntent #* this essage3 right click the 40e0e #n the right side an click Brose
Messages...
Note:
-r#/sing is 0sed *#r displa!ing a essage /ith#0t deleting it *r# the 40e0e. This is a
MQGET /ith a br#/se #pti#n set.
1$. %pr. &''( )age 1: #* +1
>h? <#0ble click the sh#/n essage3 select data #n the le*t side t# see the essage data.
Click ancel. Dn the pre1i#0s /ind#/ click lose.
>i? S/itch back t# the WebSphere MQ %), Exerciser and click #(7E/. % p#p 0p /ind#/
/ith the essage data sh#0ld appear.
Click "8 t# cl#se the /ind#/.
>2? S/itch back t# the ,-M WebSphere MQ Expl#rer and check the C0rrent 40e0e depth.
The MQGET in the %), Exerciser exec0ted a MQGET /here the essage #n the 40e0e /as
deleted. S# the C0rrent 40e0e depth sh#0ld be '. S#etie itHs a 40esti#n #* the expl#rerHs
*resh 0p #pti#n. ,* !#0 still see a 13 click the rec!cle b0tt#n *#r t# re*resh the MQ Expl#rer.
>k? Click #()"SE #n the (ueues tab t# cl#se the Q0e0e Q9%.
1$. %pr. &''( )age &' #* +1
>l? Click #(!IS #n the (ueue #ana&ers tab t# disc#nnect *r# the Q0e0e Manager.
4 En2 of lab 6. 'ou shoul2 ha1e learnt how to put an2 &et messa&es 4
1$. %pr. &''( )age &1 #* +1
Lab $: WebSphere MQ interco%%unication setup
G#al #* this lab5
,n the pre1i#0s lab3 /e ha1e created #ne Q0e0e Manager QM% and a l#cal 40e0e Q9%.
E#/ /e /ant t# set0p a sec#nd Q0e0e Manager QM- /ith a l#cal 40e0e Q9- t# p0t a essage.
There*#re /e ha1e t# add additi#nal #b2ects t# QM% t# c#0nicate /ith QM-.
Note:
F#r applicati#ns it is t#tall! transparent /hether QM- is #n the sae s!ste #r #n an#ther re#te
s!ste /ith a di**erent #perating s!ste. The di**erence is the h#stnae /hich /e ha1e t# speci*!
later #n in #0r channel de*initi#n. ,n #0r lab3 /e create the sec#nd Q0e0e Manager #n #0r sae
s!ste *#r this exercise.
First /e add the additi#nal #b2ects t# QM% /ith the MQ Expl#rer. Then /e 0se 0se the MQ
c#and line inter*ace t# set0p QM- and its *0rther #b2ects. S0re /e can als# 0se the WMQ
Expl#rer t# set0p QM-3 b0t /e ha1e s#e #perati#n s!stes3 e.g. %,Q3 /hich has the WMQ
Expl#rer. -0t then /e still ha1e the c#and line inter*ace3 /e can 0se there.
This is the c#plete pict0re #* the #b2ects /e ha1e t# create5
We ha1e alread! created Q0e0e Manager QM% and the 9#cal Q0e0e Q9%.
,n additi#n /e ha1e t# create /ithin the QM%5
a 9#cal Q0e0e /ith the #pti#n HTransissi#nH as Transissi#n Q0e0e QM,T-
a Re#te <e*initi#n Q0e0e QR- /hich p#ints t# the 9#cal Q0e0e Q9-
a Sender Channel HQM%.QM-H.
1$. %pr. &''( )age && #* +1
T# send essages *r# QM- t# QM%3 /e als# create an Recei1er Channel QM-.QM% #n
QM%
Note:
T# send a essage t# an#ther Q0e0e Manager3 /e need a Transissi#n Q0e0e >QM,TQ? /here the
essage is reliable st#red 0ntil it is s0ccess*0ll! trans*erred t# QM-. T# c#nnect Q0e0e Managers3
/e need a channel. Channels are 0ni@directi#nal. T# send a essage *r# QM% t# QM-3 /e need a
Sender Channel #n QM% and a Recei1er Channel #n QM- /hich has t# ha1e exactl! the sae
nae. ,* /e /ant t# send essages back *r# QM- t# QM%3 /e need a QM,TQ #n QM-3 a Sender
Channel #n QM- and a Recei1er Channel #n QM%.
Then /e ha1e t# create the *#ll#/ing /ith the WMQ c#and line inter*ace5
Q0e0e Manager QM-
9#cal Q0e0e Q9-
Recei1er Channel QM%.QM-
Transissi#n Q0e0e QM,T%
Sender Channel QM-.QM%
Test the set0p /ith the WMQ Exerciser and p0t a essage #n QR- #n QM% and check the essage
#n the l#cal 40e0e Q9- #n Q0e0e Manager QM-.
Complete QMA configuration for intercommunication
,* n#t alread! r0nning3 start the WebSphere MQ Expl#rer.
>a? Create a 9#cal Q0e0e /ith the #pti#n HTransissi#nH as Transissi#n Q0e0e QM,T-.
,n the ,-M WebSphere MQ Expl#rer right click (ueues and select $ew 4- )ocal (ueue...
1$. %pr. &''( )age &8 #* +1
>b? Enter 9#I/* as nae and click $e,t -.
1$. %pr. &''( )age &+ #* +1
>c? Select /ransmission as :sa&e and click .inish.
>d? Click "8 #n the next screen.
>e? Create the the Sender Channel HQM%.QM-H.
Right click hannels and click $ew 4- Sen2er hannel...
1$. %pr. &''( )age &; #* +1
>*? Enter QM!.QMB as Sender Channel $ame and click $e,t -
>g? Enter the C#nnecti#n nae and the Transissi#n Q0e0e nae.
The s!ntax #* the c#nnecti#n nae is hostname(portnumber?. ,n #0r case3 /e enter
lo'alhost("#"6) as onnection name. ,* !#0 create a Q0e0e Manager #n a di**erent s!ste3
!#0 ha1e t# speci*! the h#stnae #* this re#te s!ste. The p#rtn0ber is the p#rt speci*ied
/ith the listener #n QM- /hich /e d# later in this lab. Enter 9#I/* as /ransmission
queue /hich /e ha1e 20st d#ne. Click .inish.
1$. %pr. &''( )age &7 #* +1
>h? T# send essage *r# QM- t# QM%3 /e create an recei1er channel QM-.QM% #n QM%.
There*#re right click Channels again then $ew 4- Recei1er hannel...
Enter QMB.QM!. Click .inish.
Note:
There is n# need t# d# an! additi#nal settings *#r the Recei1er Channel. Dnl! the nae 0st
be exactl! the sae as the Sender Channel /hich /e /ill create next *#r the Q0e0e Manager
QM-.
>i? Create the re#te 40e0e de*initi#n QR-. There*#r right click Q0e0es /ithin QM% and click
$ew4-Remote (ueue !efinition... .
1$. %pr. &''( )age &$ #* +1
>2? Enter Q*B as Eae and click the $e,t- b0tt#n.
>k? The QR- is a re#te 40e0e de*initi#n /hich p#ints t# a the l#cal 40e0e Q9- #n the 40e0e
anager QM- /hich /e de*ine in the next step. The transissi#n 40e0e QM,T- is 0sed t#
trans*er the data *r# 40e0e anager QM% t# QM-. S# /e ha1e n#/ t# enter here.
Enter Q%B *#r the Re#te 40e0e >/hich is the l#cal 40e0e #n QM-?3 enter QMB *#r the
Re#te 40e0e anager and enter +MI,B as Transissi#n 40e0e.
1$. %pr. &''( )age &( #* +1
Create Queue Manager QMB and its objects with the WMQ command line
interface
>a? Create the Q0e0e Manager. There*#re #pen a c#and pr#t.
Start 4- +ll Pro&rams 4- +ccessories 4- omman2 Prompt
Enter5
'rtmqm QMB
and press the enter ke!
>b? Start the Q0e0e Manager QM-
Enter5
strmqm QMB
and press the enter ke!
>c? Create the *0rther #b2ects *#r the Q0e0e Manager QM-. There*#re enter
runmqs' QMB
1$. %pr. &''( )age &: #* +1
>d? Create the l#cal 40e0e Q9-. Enter e.g. 2ef and press enter. Then !#0 /ill see se1eral 1alid
c#ands t# enter. ,n #0r case3 enter !E.I$E ()"+) and !#0 /ill see all p#ssible
#pti#ns *#r this c#and. E#/ enter !E.I$E ()"+) ;<()*<= t# create the 40e0e.
>e? Enter -.FIN. Q%/C!%(0+MI,!0) 1S!2.(+MI,Q) t# create the Transissi#n Q0e0e.
>*? Create the Recei1er Channel. There*#r enter !E. >+$$E) t# see the 1alid #pti#ns.
Enter5
-.F C3!NN.%(0QM!.QMB0) C3%,4P.(*C5*)
>g? Create a Sender Channel. There*#r enter5
-.F C3!NN.%(0QMB.QM!0) C3%,4P.(S-*) C/NN!M.(0lo'alhost("#"$)0)
+MI,Q(0+MI,!0)
and press Enter.
Note:
Reeber that naes like the channel nae is case sensiti1e.
>h? %ll #b2ects are created s# *ar. -0t /e still ha1e t# create and start the listener #n p#rt 1+17
/hich is n#t part #* the crt4 c#and.
There*#re enter the *#ll#/ing c#and5
-.FIN. %IS,.N.*(%IS,.N.*.,CP) ,*P,4P.(,CP)
%I6.(S4S,.M.-.F!1%,.%IS,.N.*.,CP) P/*,("#"6) C/N,*/%(QM2*)
and the *#ll#/ing c#and t# start the listener5
S,!*, %IS,.N.*(%IS,.N.*.,CP)
enter en& t# end the r0n4sc c#and.
1$. %pr. &''( )age 8' #* +1
Note:
,nstead #* entering each c#and #n the c#and line3 it is als# s0pp#rted t# c#p! all the
c#ands int# a *ile3 *#r exaple !set0p.c*g3 and r0n the r0n4sc c#and in the
*#ll#/ing /a!5
runmqsc ? m3setup.cf&
Kere a saple *#r the c#ntent #* the !set0p.c*g *ile5
V de*ine the #b2ects *#r the 40e0e anager QM-
<EF,EE Q9DC%9 >HQ9-H?
<EF,EE Q9DC%9>HQM,T%H? 6S%GE>QM,TQ?
<EF,EE CK%EEE9>HQM%.QM-H? CK9TF)E>RCVR?
<EF,EE CK%EEE9>HQM-.QM%H? S
CK9TF)E>S<R? S
CDEE%ME>Hl#calh#st>1+1;?H? S
QM,TQ>HQM,T%H? RE)9%CE
<EF,EE 9,STEEER>9,STEEER.TC)? S
TR)TF)E>TC)? S
9,UE>SFSTEM.<EF%69T.9,STEEER.TC)? S
)DRT>1+17? S
CDETRD9>QMGR?
ST%RT 9,STEEER>9,STEEER.TC)?
Note:
The paraeter RE)9%CE eans that the c#and /ill exec0ted e1en i* the #b2ect alread!
exists. The HSH sign at the end #* the line can be 0sed t# split #ne l#ng c#and int# se1eral lines.
1$. %pr. &''( )age 81 #* +1
Lab &: 'est the WebSphere MQ interco%%unication
G#al #* this lab5
)articipants /ill 0se the WebSphere MQ %), Exerciser t##l t# p0t essages #n a Re#te Q0e0e
>a? Start the Sender Channels.
We ha1e created a Sender Channel QM%.QM- t# send essages *r# QM% t# QM-3 b0t
the sender is c0rrentl! inacti1e. T# start the channel3 right click the Sender Channel in the
,-M WebSphere MQ Expl#rer and click Start...
Note:
The c#ands *#r the WMQ #b2ects are as!nchr#n#0s. S# getting a s0ccess*0l essage
eans that the c#and /as started s0ccess*0l. ,t can take a *e/ sec#nds 0ntil !#0 see the
r0nning channel. Click the re*resh b0tt#n at the t#p right #* the /ind#/ t# 0pdate the 1ie/
0ntil !#0 see the "1erall channel status5 Runnin&.
1$. %pr. &''( )age 8& #* +1
>b? Check the Recei1er Channel #* the 40e0e anager QM-.
The stat0s there sh#0ld als# be Runnin&.
Put a message on the remote ueue using the WMQ !"plorer
The ,-M WebSphere MQ Expl#rer can be 0sed t# p0t a essage #n a 40e0e as /ell.
Start the WMQ Expl#rer i* n#t alread! started5 Start 78 !ll Programs 78 IBM WebSphere MQ 78
WebSphere MQ .9plorer.
>a? Right Click the (R* Q0e0e and select Put /est #essa&e...
1$. %pr. &''( )age 88 #* +1
>b? Enter s#e test data #n the next screen and click the Put messa&e b0tt#n. Then click the
lose b0tt#n.
>c? Check the Q0e0e Q9- *#r an arri1ing essage.
Right click the 9#cal Q0e0e ()* #* the Q0e0e Manager (#* and check the urrent
queue 2epth.
Note:
,* the essage has n#t arri1ed3 check the urrent queue 2epth #* the Transissi#n Q0e0e.
T!pical istakes are5 the pr#perties >Q0e0e nae and Q0e0e Manger nae? #* the Re#te
Q0e0e <e*initi#n are n#t c#rrect. %n#ther *a0lt is that the channel is n#t r0nning.
% t!pical istake is the s!ntax #* the C#nnecti#n nae #* the sender channel.
1$. %pr. &''( )age 8+ #* +1
Put a message on the remote ueue using the WMQ API !"erciser with Ad#anced
options
We ha1e alread! 0sed the WMQ %), Exerciser in 9ab 8. WMQ has #nl! these 18 %),s b0t each
%), has an! #pti#ns. T# enable the %d1anced M#de in the WMQ %), Exerciser3 /e see all these
#pti#ns and can test s#e #* the. The! are identical t# the #pti#ns #* the pr#graing inter*ace.
>a? Start the WebSphere MQ %), Exerciser t##l i* n#t alread! started. R0n a4api.exe.
Enable the +21ance2 mo2e b! click the check b#x.
E#te the additi#nal tab +ttributes /hich appears a*ter the %d1ance #de enableent.
>b? Click #("$$ t# c#nnect t# the Q0e0e Manager QM%.
1$. %pr. &''( )age 8; #* +1
>c? S/itch t# the (ueues tab3 select the Q0e0e (R* and click #("PE$.
Thr#0gh the %d1anced #de3 an additi#nal /ind#/ #("PE$ @ Selectable "ptions
sh#0ld appear. R0st clicking DU /#0ld *ail. The de*a0lt #pti#ns are n#t 1alid *#r a Re#te
Q0e0e <e*initi#n. F#0 ha1e t# change the *#ll#/ing #pti#ns.
<eselect #(""AI$P:/A+SA(A!E.3 select #(""A":/P:/ and click "8.
>d? Click #(P:/ t# p0t a essage int# the Re#te <e*initi#n Q0e0e QR-. Take a l##k at the
additi#nal tabs #n the ne/ #(P:/ @ +r&ument "ptions /ind#/. -e*#re !#0 click "83
check #0t the #pti#ns. E#tice that the Message <escript#r tab has $ pages t# /hich !#0 can
get b! click the $e,t - b0tt#n.
Note:
% WMQ Message c#ntains a WMQ Keader >MQM< MQ Message <escript#r? and the
data itsel*. ,n the MQM< !#0 can set #pti#ns like Message ,<3 Message F#rat >e.g. String
1$. %pr. &''( )age 87 #* +1
MWFMTBSTR,EG?3 Message T!pe >Re40est3 Repl!3 <ata3 ... ?3 persistence3 expirati#n
date3 ... . S#e settings are 0sed b! WMQ itsel*3 e.g.5%n expired essage is deleted b!
WMQ *r# the 40e0e a*ter expirati#n. Dther #pti#ns ha1e t# be handled b! the recei1ing
applicati#n3 e.g.5 ,* the essage is a re40est3 a repl! is expected3 /here the Repl!@T#@Q0e0e
and the Repl!@T#@Q0e0e Manager sh#0ld be speci*ied b! the sending applicati#n in the
MQM<.
>e? Check the Q0e0e Q9- #n QM- *#r a ne/ essage.
F#0 can check the C0rrent Q0e0e <epth in the WebSphere MQ Expl#rer.
%n#ther /as is t# 0se the c#and line inter*ace5
There*#re enter #n the c#and pr#pt5
runmqsc (#*
2is ql;()*=
F#0 can see the 1al0e #* :R!EP/>;6= /hich eans ! c0rrent 40e0e depth is &.
1$. %pr. &''( )age 8$ #* +1
>*? S/itch back in the WebSphere MQ %), Exerciser cl#se the 40e0e QR-. There*#r click
#()"SE. Dn the next screen lea1e the de*a0lts and click DU.
>g? S/itch t# the Q0e0e Manager tab and disc#nnect *r# the 40e0e anager QM%. There*#r
click #(!IS.
>h? Select the 9#cal Q0e0e Manager QM- and click MQCDEE t# c#nnect t#t 40e0e anager
(#*.
1$. %pr. &''( )age 8( #* +1
>i? Dpen the l#cal 40e0e Q9-. Select the 40e0e ()* and click #("PE$.
>2? %s !#0 reeber3 !#0 changed the #pen #pti#ns *#r the QR- #pen c#and. With these
#pti#ns3 !#0 can n#t get the essages *r# the l#cal 40e0e Q9-. S# !#0 ha1e t# change the
#pen #pti#ns back t# the pre1i#0s de*a0lts. Select #(""AI$P:/A+sA(A!E. and
deselect #(""A":/P:/.
1$. %pr. &''( )age 8: #* +1
>k? Click #(7E/ t# get the essage *r# the Q0e0e.
Click the E,ecute b0tt#n #n the #(7E/ @ +r&uments "ptions win2ow.
>l? The *#ll#/ing screen /ith the essage data sh#0ld appear. Click "8.
>?Dnce !#0 are s0re that !#0r scenari# /#rked c#rrectl!3 !#0 can LMQGETM all essages
*r# the Q0e0es t# clear the #* an! c#ntent.
>n? E#/ create s#e additi#nal Q0e0es /ith naes and pr#perties #* !#0r ch#ice. )la! ar#0nd
/ith the and ake !#0rsel* *ailiar /ith the di**erent #pti#nsW Tr!3 *#r exaple3 t#
LinhibitM a p0t and get *#r a 40e0e. This /a! it is Lpr#tectedM and its c#ntents can n#t be
#di*ied. %ls# d# adinistrati1e tasks3 like renaing #b2ects and *inall! delete these Xpla!Y
Q0e0es againW
>#? 9astl! !#0 can delete the Q0e0e Managers LQM%M and LQM-M /ith all their #b2ectsW
44444 on&ratulations BB 'ou ha1e finishe2 all the labs 44444
1$. %pr. &''( )age +' #* +1
Su%%ar( an! %ore In)or%ations
%s !#0 alread! a! ha1e realiPed3 #re Q0e0e Manager3 Q0e0es and Channels can lead t# a nae
c#n*0si#n #r c#n*licts. There*#re it is rec#ended t# think ab#0t naing c#n1enti#ns at the
beginning #* a pr#2ect.
Dn the *#ll#/ing page !#0 can *ind #re in*#rati#n ab#0t naing c#n1enti#ns5
http5==///@1.ib.c#=s0pp#rt=d#c1ie/./ssArsC1$1I0idCs/g&+'''7;7Il#cCenB6SIcsC0t*@(IlangCen
F#r #re saples and pr#d0ct enhanceents check the WMQ S0pp#rt)ac page *irst5
http5==///@1.ib.c#=s0pp#rt=d#c1ie/./ssArsC:$$I0idCs/g&$''$&';
F#r #re pr#graing saples check the TWM- installati#n r##tOGT##lsG direct#r!.
,t c#ntains c#de saples and exec0tables in se1eral pr#graing lang0ages.
F#r #re in*#rati#n ab#0t WMQ err#rs3 check the *ile %MQERR'1.l#g in the
TWM- installati#n r##tOGQgrsGT40e0e anager naeOGerr#rs direct#r!.
M#re in*#rati#n ab#0t these essage c#0ld be *#0nd in the WebSphere MQ Messages b##k5
http5==///@8'7.ib.c#=s#*t/are=integrati#n=/4=librar!=librar!7x.htl
F#r *0rther in*#rati#n check #0t the WebSphere MQ )r#d0ct side5
http5==///@8'7.ib.c#=s#*t/are=integrati#n=/4=index.htl
Kere !#0 can als# *ind links t# the s0pp#rt page /ith rec#ended *ixes3 t# the librar! /ith the
pr#d0ct )0blicati#ns and Redb##ks.
1$. %pr. &''( )age +1 #* +1