__ Prepare a WebSphere MQ command file with the same commands you entered
interactively in Step 2. Call the file "E1_ST03.txt".
DIS QMGR
DIS Q(SYSTEM*)
DEF QL(QL.A) DESCR('QL.A Text')
DIS QL(QL.A)
ALTER QL(QL.A) MAXDEPTH(1000)
DIS QL(QL.A)
DEF QL(QL.B) DESCR('QL.B Text')
DEF QL(QL.B) REPLACE +
MAXDEPTH(2000)
DIS QL(QL.B)
__ Process the command file and direct the results to the file "report". Have a look at
the file containing the results.
• runmqsc < E1_ST03.txt > report
5724-H72 (C) Copyright IBM Corp. 1994, 2005. ALL RIGHTS RESERVED.
Starting MQSC for queue manager MQ.QM1.
1 : DIS QMGR
AMQ8408: Display Queue Manager details.
QMNAME(MQ.QM1) ACCTCONO(DISABLED)
ACCTINT(1800) ACCTMQI(OFF)
ACCTQ(OFF) ACTIVREC(MSG)
ALTDATE(2010-08-18) ALTTIME(12.21.00)
AUTHOREV(DISABLED) CCSID(1208)
CHAD(DISABLED) CHADEV(DISABLED)
CHADEXIT( ) CHLEV(DISABLED)
CLWLDATA( ) CLWLEXIT( )
CLWLLEN(100) CLWLMRUC(999999999)
CLWLUSEQ(LOCAL) CMDLEVEL(600)
COMMANDQ(SYSTEM.ADMIN.COMMAND.QUEUE) CRDATE(2010-08-18)
CRTIME(12.21.00) DEADQ( )
DEFXMITQ( ) DESCR( )
DISTL(YES) INHIBTEV(DISABLED)
IPADDRV(IPV4) LOCALEV(DISABLED)
LOGGEREV(DISABLED) MAXHANDS(256)
MAXMSGL(4194304) MAXPRTY(9)
MAXUMSGS(10000) MONACLS(QMGR)
MONCHL(OFF) MONQ(OFF)
PERFMEV(DISABLED) PLATFORM(UNIX)
QMID(MQ.QM1_2010-08-18_12.21.00) REMOTEEV(DISABLED)
REPOS( ) REPOSNL( )
ROUTEREC(MSG) SCHINIT(QMGR)
SCMDSERV(QMGR) SSLCRLNL( )
SSLCRYP( ) SSLEV(DISABLED)
SSLFIPS(NO)
SSLKEYR(/var/mqm/qmgrs/MQ!QM1/ssl/key)
SSLRKEYC(0) STATACLS(QMGR)
STATCHL(OFF) STATINT(1800)
STATMQI(OFF) STATQ(OFF)
STRSTPEV(ENABLED) SYNCPT
TRIGINT(999999999)
2 : DIS Q(SYSTEM*)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.ACCOUNTING.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.ACTIVITY.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.CHANNEL.EVENT) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.COMMAND.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.LOGGER.EVENT) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.PERFM.EVENT) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.QMGR.EVENT) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.STATISTICS.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.TRACE.ROUTE.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.AUTH.DATA.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.CHANNEL.INITQ) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.CHANNEL.SYNCQ) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.CICS.INITIATION.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.CLUSTER.COMMAND.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.CLUSTER.REPOSITORY.QUEUE)
TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.CLUSTER.TRANSMIT.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.DEAD.LETTER.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.DEFAULT.ALIAS.QUEUE) TYPE(QALIAS)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.DEFAULT.INITIATION.QUEUE)
TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.DEFAULT.LOCAL.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.DEFAULT.MODEL.QUEUE) TYPE(QMODEL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.DEFAULT.REMOTE.QUEUE) TYPE(QREMOTE)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.MQEXPLORER.REPLY.MODEL) TYPE(QMODEL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.MQSC.REPLY.QUEUE) TYPE(QMODEL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.PENDING.DATA.QUEUE) TYPE(QLOCAL)
3 : DEF QL(QL.A) DESCR('QL.A Text')
AMQ8150: WebSphere MQ object already exists.
4 : DIS QL(QL.A)
AMQ8409: Display Queue details.
QUEUE(QL.A) TYPE(QLOCAL)
ACCTQ(QMGR) ALTDATE(2010-08-18)
ALTTIME(13.55.59) BOQNAME( )
BOTHRESH(0) CLUSNL( )
CLUSTER( ) CLWLPRTY(0)
CLWLRANK(0) CLWLUSEQ(QMGR)
CRDATE(2010-08-18) CRTIME(13.50.05)
CURDEPTH(0) DEFBIND(OPEN)
DEFPRTY(0) DEFPSIST(NO)
DEFSOPT(SHARED) DEFTYPE(PREDEFINED)
DESCR(QL.A QUEUE A BLAH) DISTL(NO)
GET(ENABLED) HARDENBO
INITQ( ) IPPROCS(0)
MAXDEPTH(1000) MAXMSGL(4194304)
MONQ(QMGR) MSGDLVSQ(PRIORITY)
NOTRIGGER NPMCLASS(NORMAL)
OPPROCS(0) PROCESS( )
PUT(ENABLED) QDEPTHHI(80)
QDEPTHLO(20) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QDPMAXEV(ENABLED)
QSVCIEV(NONE) QSVCINT(999999999)
RETINTVL(999999999) SCOPE(QMGR)
SHARE STATQ(QMGR)
TRIGDATA( ) TRIGDPTH(1)
TRIGMPRI(0) TRIGTYPE(FIRST)
USAGE(NORMAL)
5 : ALTER QL(QL.A) MAXDEPTH(1000)
AMQ8008: WebSphere MQ queue changed.
6 : DIS QL(QL.A)
AMQ8409: Display Queue details.
QUEUE(QL.A) TYPE(QLOCAL)
ACCTQ(QMGR) ALTDATE(2010-08-19)
ALTTIME(11.39.46) BOQNAME( )
BOTHRESH(0) CLUSNL( )
CLUSTER( ) CLWLPRTY(0)
CLWLRANK(0) CLWLUSEQ(QMGR)
CRDATE(2010-08-18) CRTIME(13.50.05)
CURDEPTH(0) DEFBIND(OPEN)
DEFPRTY(0) DEFPSIST(NO)
DEFSOPT(SHARED) DEFTYPE(PREDEFINED)
DESCR(QL.A QUEUE A BLAH) DISTL(NO)
GET(ENABLED) HARDENBO
INITQ( ) IPPROCS(0)
MAXDEPTH(1000) MAXMSGL(4194304)
MONQ(QMGR) MSGDLVSQ(PRIORITY)
NOTRIGGER NPMCLASS(NORMAL)
OPPROCS(0) PROCESS( )
PUT(ENABLED) QDEPTHHI(80)
QDEPTHLO(20) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QDPMAXEV(ENABLED)
QSVCIEV(NONE) QSVCINT(999999999)
RETINTVL(999999999) SCOPE(QMGR)
SHARE STATQ(QMGR)
TRIGDATA( ) TRIGDPTH(1)
TRIGMPRI(0) TRIGTYPE(FIRST)
USAGE(NORMAL)
7 : DEF QL(QL.B) DESCR('QL.B Text')
AMQ8150: WebSphere MQ object already exists.
8 : DEF QL(QL.B) REPLACE +
: MAXDEPTH(2000)
AMQ8006: WebSphere MQ queue created.
9 : DIS QL(QL.B)
AMQ8409: Display Queue details.
QUEUE(QL.B) TYPE(QLOCAL)
ACCTQ(QMGR) ALTDATE(2010-08-19)
ALTTIME(11.39.46) BOQNAME( )
BOTHRESH(0) CLUSNL( )
CLUSTER( ) CLWLPRTY(0)
CLWLRANK(0) CLWLUSEQ(QMGR)
CRDATE(2010-08-18) CRTIME(13.50.16)
CURDEPTH(0) DEFBIND(OPEN)
DEFPRTY(0) DEFPSIST(NO)
DEFSOPT(SHARED) DEFTYPE(PREDEFINED)
DESCR( ) DISTL(NO)
GET(ENABLED) HARDENBO
INITQ( ) IPPROCS(0)
MAXDEPTH(2000) MAXMSGL(4194304)
MONQ(QMGR) MSGDLVSQ(PRIORITY)
NOTRIGGER NPMCLASS(NORMAL)
OPPROCS(0) PROCESS( )
PUT(ENABLED) QDEPTHHI(80)
QDEPTHLO(20) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QDPMAXEV(ENABLED)
QSVCIEV(NONE) QSVCINT(999999999)
RETINTVL(999999999) SCOPE(QMGR)
SHARE STATQ(QMGR)
TRIGDATA( ) TRIGDPTH(1)
TRIGMPRI(0) TRIGTYPE(FIRST)
USAGE(NORMAL)
9 MQSC commands read.
No commands have a syntax error.
2 valid MQSC commands could not be processed.
Use the sample programs
__ Put messages on the local queue QL.A.
• amqsput QL.A
(The queue manager name is optional, because it is the default queue manager)
amqsput is a sample program. This can be found in mqm/samp/bin
[mqm@localhost ~]$ /opt/mqm/samp/bin/amqsput QL.A
Sample AMQSPUT0 start
target queue is QL.A
bhaskar
ramaraju
so what
know what
yes a lot
__ Browse the messages of the queue. Direct the output to a file and look at the results.
• amqsbcg QL.A > out
(The queue manager name is optional, because it is the default queue manager)
AMQSBCG0 - starts here
**********************
MQOPEN - 'QL.A'
MQGET of message number 1
****Message descriptor****
StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 1208
Format : 'MQSTR '
Priority : 0 Persistence : 0
MsgId : X'414D51204D512E514D312020202020207D736D4C02090020'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'MQ.QM1 '
** Identity Context
UserIdentifier : 'mqm '
AccountingToken :
X'0335303200000000000000000000000000000000000000000000000000000006'
ApplIdentityData : ' '
** Origin Context
PutApplType : '6'
PutApplName : 'amqsput '
PutDate : '20100819' PutTime : '18442779'
ApplOriginData : ' '
GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'
**** Message ****
length - 7 bytes
00000000: 6268 6173 6B61 72 'bhaskar '
MQGET of message number 2
****Message descriptor****
StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 1208
Format : 'MQSTR '
Priority : 0 Persistence : 0
MsgId : X'414D51204D512E514D312020202020207D736D4C03090020'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'MQ.QM1 '
** Identity Context
UserIdentifier : 'mqm '
AccountingToken :
X'0335303200000000000000000000000000000000000000000000000000000006'
ApplIdentityData : ' '
** Origin Context
PutApplType : '6'
PutApplName : 'amqsput '
PutDate : '20100819' PutTime : '18443040'
ApplOriginData : ' '
GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'
**** Message ****
length - 8 bytes
00000000: 7261 6D61 7261 6A75 'ramaraju '
MQGET of message number 3
****Message descriptor****
StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 1208
Format : 'MQSTR '
Priority : 0 Persistence : 0
MsgId : X'414D51204D512E514D312020202020207D736D4C04090020'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'MQ.QM1 '
** Identity Context
UserIdentifier : 'mqm '
AccountingToken :
X'0335303200000000000000000000000000000000000000000000000000000006'
ApplIdentityData : ' '
** Origin Context
PutApplType : '6'
PutApplName : 'amqsput '
PutDate : '20100819' PutTime : '18443598'
ApplOriginData : ' '
GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'
**** Message ****
length - 7 bytes
00000000: 736F 2077 6861 74 'so what '
MQGET of message number 4
****Message descriptor****
StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 1208
Format : 'MQSTR '
Priority : 0 Persistence : 0
MsgId : X'414D51204D512E514D312020202020207D736D4C05090020'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'MQ.QM1 '
** Identity Context
UserIdentifier : 'mqm '
AccountingToken :
X'0335303200000000000000000000000000000000000000000000000000000006'
ApplIdentityData : ' '
** Origin Context
PutApplType : '6'
PutApplName : 'amqsput '
PutDate : '20100819' PutTime : '18444307'
ApplOriginData : ' '
GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'
**** Message ****
length - 9 bytes
00000000: 6B6E 6F77 2077 6861 74 'know what '
MQGET of message number 5
****Message descriptor****
StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 1208
Format : 'MQSTR '
Priority : 0 Persistence : 0
MsgId : X'414D51204D512E514D312020202020207D736D4C06090020'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'MQ.QM1 '
** Identity Context
UserIdentifier : 'mqm '
AccountingToken :
X'0335303200000000000000000000000000000000000000000000000000000006'
ApplIdentityData : ' '
** Origin Context
PutApplType : '6'
PutApplName : 'amqsput '
PutDate : '20100819' PutTime : '18444667'
ApplOriginData : ' '
GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'
**** Message ****
length - 9 bytes
00000000: 7965 7320 6120 6C6F 74 'yes a lot '
No more messages
MQCLOSE
MQDISC
__ Get the messages from the queue to make the queue empty.
• amqsget QL.A
(The queue manager name is optional, because it is the default queue manager)
Sample AMQSGET0 start
message <bhaskar>
message <ramaraju>
message <so what>
message <know what>
message <yes a lot>
no more messages
Sample AMQSGET0 end
This cleans the queue.
Work with alias queues
__ Create an alias queue QA.A which resolves to your local queue QL.A.
• DEF QA(QA.A) TARGQ(QL.A)
__ Inhibit put requests on the alias queue.
• ALTER QA(QA.A) PUT(DISABLED)
__ Change QL.B to inhibit put requests on your local queue QL.B.
• ALTER QL(QL.B) PUT(DISABLED)
__ Create an alias queue QA.B which resolves to your local queue QL.B.
• DEF QA(QA.B) TARGQ(QL.B)
DEF QA(QA.A) TARGQ(QL.A)
1 : DEF QA(QA.A) TARGQ(QL.A)
AMQ8006: WebSphere MQ queue created.
ALTER QA(QA.A) PUT(DISABLED)
2 : ALTER QA(QA.A) PUT(DISABLED)
AMQ8008: WebSphere MQ queue changed.
ALTER QL(QL.B) PUT(DISABLED)
3 : ALTER QL(QL.B) PUT(DISABLED)
AMQ8008: WebSphere MQ queue changed.
DEF QA(QA.B) TARQG(QL.B)
4 : DEF QA(QA.B) TARQG(QL.B)
AMQ8405: Syntax error detected at or near end of command segment below:-
DEF QA(QA.B) T
AMQ8427: Valid syntax for the MQSC command:
DEFINE QALIAS(q_name)
[ CLUSNL(namelist_name) ] [ CLUSTER(cluster_name) ]
[ DEFBIND( NOTFIXED | OPEN ) ] [ DEFPRTY(integer) ]
[ DEFPSIST( YES | NO ) ] [ DESCR(string) ]
[ GET( ENABLED | DISABLED ) ] [ LIKE(qalias_name) ]
[ REPLACE | NOREPLACE ] [ PUT( ENABLED | DISABLED ) ]
[ SCOPE( QMGR | CELL ) ] [ TARGQ(string) ]
[ CLWLRANK(integer) ] [ CLWLPRTY(integer) ]
DEF QA(QA.B) TARGQ(QL.B)
5 : DEF QA(QA.B) TARGQ(QL.B)
AMQ8006: WebSphere MQ queue created.
END
6 : END
5 MQSC commands read.
__ Try to put messages on both alias and local queues using the sample program.
• amqsput QL.A
• amqsput QA.A
• amqsput QL.B
• amqsput QA.B
[mqm@localhost ~]$ /opt/mqm/samp/bin/amqsput QL.A
Sample AMQSPUT0 start
target queue is QL.A
bhaskar is the name of the this person
u know if u dont know you better know
[mqm@localhost ~]$ /opt/mqm/samp/bin/amqsput QA.A
Sample AMQSPUT0 start
target queue is QA.A
do you really want to test the alias queues
MQPUT ended with reason code 2051
Sample AMQSPUT0 end
[mqm@localhost ~]$
[mqm@localhost ~]$ /opt/mqm/samp/bin/amqsput QL.B
Sample AMQSPUT0 start
target queue is QL.B
I am testing ql.b
MQPUT ended with reason code 2051
Sample AMQSPUT0 end
[mqm@localhost ~]$ /opt/mqm/samp/bin/amqsput QA.B
Sample AMQSPUT0 start
target queue is QA.B
This is the time to test QA.B
MQPUT ended with reason code 2051
Sample AMQSPUT0 end
The thing here is
We have an alias queue per local queue. QA.A is alias for QL.A and QA.B is the alias for QL.B.
ALTER QA(QA.A) PUT(DISABLED)
This disabled PUT on QA.A
Alias has muted PUT.
ALTER QL(QL.B) PUT(DISABLED)
This muted the PUT on local queue itself.
Working with queues
__ 1. Put some messages on your queues QL.A and QL.B.
On QL.B, put is disabled above. So, reset it to enable
ALTER QL(QL.B) PUT (ENABLE)
1 : ALTER QL(QL.B) PUT (ENABLE)
AMQ8405: Syntax error detected at or near end of command segment below:-
ALTER QL(QL.B) PUT (E
AMQ8427: Valid syntax for the MQSC command:
ALTER QLOCAL(q_name)
[ FORCE ] [ BOQNAME(string) ]
[ BOTHRESH(integer) ] [ CLUSNL(namelist_name) ]
[ CLUSTER(cluster_name) ] [ DEFBIND( NOTFIXED | OPEN ) ]
[ DEFPRTY(integer) ] [ DEFPSIST( YES | NO ) ]
[ DESCR(string) ] [ DEFSOPT( EXCL | SHARED ) ]
[ DISTL( YES | NO ) ] [ GET( ENABLED | DISABLED ) ]
[ INITQ(string) ] [ MAXDEPTH(integer) ]
[ MAXMSGL(integer) ] [ MSGDLVSQ( PRIORITY | FIFO ) ]
[ HARDENBO | NOHARDENBO ] [ SHARE | NOSHARE ]
[ TRIGGER | NOTRIGGER ] [ PROCESS(string) ]
[ PUT( ENABLED | DISABLED ) ] [ QDEPTHHI(integer) ]
[ QDEPTHLO(integer) ] [ QDPHIEV( ENABLED | DISABLED ) ]
[ QDPLOEV( ENABLED | DISABLED ) ] [ QDPMAXEV( ENABLED | DISABLED ) ]
[ QSVCIEV( NONE | HIGH | OK ) ] [ QSVCINT(integer) ]
[ RETINTVL(integer) ] [ SCOPE( QMGR | CELL ) ]
[ TRIGDATA(string) ] [ TRIGDPTH(integer) ]
[ TRIGMPRI(integer) ]
[ TRIGTYPE( FIRST | EVERY | DEPTH | NONE ) ]
[ USAGE( NORMAL | XMITQ ) ] [ NPMCLASS( NORMAL | HIGH ) ]
[ STATQ( QMGR | ON | OFF ) ] [ ACCTQ( QMGR | ON | OFF ) ]
[ MONQ( QMGR | OFF | LOW | MEDIUM | HIGH ) ]
[ CLWLRANK(integer) ] [ CLWLPRTY(integer) ]
[ CLWLUSEQ( LOCAL | ANY | QMGR ) ]
ALTER QL(QL.B) PUT (ENABLED)
2 : ALTER QL(QL.B) PUT (ENABLED)
AMQ8008: WebSphere MQ queue changed.
END
[mqm@localhost ~]$ /opt/mqm/samp/bin/amqsput QL.B
Sample AMQSPUT0 start
target queue is QL.B
blah blah QL.B blah blah
its working now enable and enabled...awesome difference
__ 2. Show the CURDEPTH of all the queues you have created.
• DISPLAY Q(Q*) CURDEPTH
DISPLAY Q(Q*) CURDEPTH
1 : DISPLAY Q(Q*) CURDEPTH
AMQ8409: Display Queue details.
QUEUE(QA.A) TYPE(QALIAS)
AMQ8409: Display Queue details.
QUEUE(QA.B) TYPE(QALIAS)
AMQ8409: Display Queue details.
QUEUE(QL.A) TYPE(QLOCAL)
CURDEPTH(6)
AMQ8409: Display Queue details.
QUEUE(QL.B) TYPE(QLOCAL)
CURDEPTH(2)
__ 3. Define an new local queue QL.X with the attributes of QA.A
• DEFINE QLOCAL(QL.X) LIKE(QA.A)
DEFINE QLOCAL(QL.X) LIKE (QA.A)
2 : DEFINE QLOCAL(QL.X) LIKE (QA.A)
AMQ8138: The WebSphere MQ queue has an incorrect type.
That says, one cannot create a queue like an alias
__ 4. Error? Now use the attributes of QL.A.
• DEFINE QLOCAL(QL.X) LIKE(QL.A)
DEFINE QL(QL.X) LIKE (QL.A)
3 : DEFINE QL(QL.X) LIKE (QL.A)
AMQ8006: WebSphere MQ queue created.
__ 5. Put some messages on QL.X.
• amqsput QL.X
[mqm@localhost ~]$ /opt/mqm/samp/bin/amqsput QL.X
Sample AMQSPUT0 start
target queue is QL.X
Here is my new queue buddy QL.X
Let me test this guy out
__ 6. Change the description of QL.A.
• ALTER QL(QL.A) DESCR('QL.A Text new')
ALTER QL(QL.A) DESCR('QL.A Text new')
4 : ALTER QL(QL.A) DESCR('QL.A Text new')
AMQ8008: WebSphere MQ queue changed.
__ 7. Display the DESCR attribute of all your queues.
• DISPLAY Q(Q*) DESCR
__ 8. Any change?
QL.X has QL.A's description
QL.A has new description
__ 9. Clear queue QL.A
• CLEAR QL(QL.A)
CLEAR QL(QL.A)
6 : CLEAR QL(QL.A)
DISPLAY Q(QL.A) CURDEPTH
7 : DISPLAY Q(QL.A) CURDEPTH
AMQ8409: Display Queue details.
QUEUE(QL.A) TYPE(QLOCAL)
CURDEPTH(0)
AMQ8022: WebSphere MQ queue cleared.
__ 10. Clear queue QA.A
• CLEAR QA(QA.A)
CLEAR QA(QA.A)
11 : CLEAR QA(QA.A)
AMQ8405: Syntax error detected at or near end of command segment below:-
CLEAR QA
AMQ8426: Valid MQSC commands are:
CLEAR QLOCAL
__ 11. Successfully? Give the reason why.
Means that you cannot clear an alias queue. Makes sense, alias queue is just a pointer to a queue, it does not hold any info in it.
__ 12. Delete QL.X
• DELETE QL(QL.X)
DELETE QL(QL.X)
12 : DELETE QL(QL.X)
AMQ8143: WebSphere MQ queue not empty.
Lets see the depth of the QL.X
DISPLAY Q(QL.X) CURDEPTH
13 : DISPLAY Q(QL.X) CURDEPTH
AMQ8409: Display Queue details.
QUEUE(QL.X) TYPE(QLOCAL)
CURDEPTH(2)
So one cannot delete an non empty queue
__ 13. Successfully deleted? If not, modify the command
• DELETE QL(QL.X) purge
DELETE QL(QL.X) purge
14 : DELETE QL(QL.X) purge
AMQ8007: WebSphere MQ queue deleted.
My MQ Notes