ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » Clustering » My first version of MQSC script

Post new topic  Reply to topic Goto page 1, 2  Next
 My first version of MQSC script « View previous topic :: View next topic » 
Author Message
samsam007
PostPosted: Tue Nov 11, 2008 11:04 pm    Post subject: My first version of MQSC script Reply with quote

Centurion

Joined: 30 Oct 2008
Posts: 107

Hi,

I have written a MQSC script to create a Cluster, Qmgr, some local queues, stream queues and control queues, as well as alias queues.
But I am not sure whether they are written in the correct way.

Can anyone give comment and suggestion how to improve it?

Here is the script:
crtmqm -u SYSTEM.DEAD.LETTER.QUEUE ITSMMS
strmqm ITSMMS
runmqsc ITSMMS << EOF
ALTER QMGR REPOS(SIG)
DEFINE CHANNEL(TO.ITSMMS) CHLTYPE(CLUSRCVR) TRPTYPE(TCP) CONNAME('ITSMMS(2187)') CLUSTER(SIG) DESCR('TCP Cluster-receiver channel for queue manager ITSMMS') MCAUSER('mqm') REPLACE
DEFINE CHANNEL(TO.ITSMMS2) CHLTYPE(CLUSSDR) TRPTYPE(TCP) CONNAME('ITSMMS2(2188)') CLUSTER(SIG) DESCR('TCP Cluster-sender channel from ITSMMS to repository at ITSMMS2') MCAUSER('mqm') REPLACE

DEFINE QLOCAL('CLUS.TDCS.SEND') REPLACE DESCR('TDCS app gets message from') USAGE(XMITQ)
DEFINE QLOCAL('CLUS.TTS.SEND') REPLACE DESCR('TTS app gets message from') USAGE(XMITQ)
DEFINE QLOCAL('CLUS.TSS.SEND') REPLACE DESCR('TSS app gets message from') USAGE(XMITQ)
DEFINE QLOCAL('CLUS.RIDE.SEND') REPLACE DESCR('RIDE app gets message from') USAGE(XMITQ)
DEFINE QLOCAL('CLUS.FCSS.SEND') REPLACE DESCR('FCSS app gets message from') USAGE(XMITQ)

DEFINE QALIAS('TDCS.SEND.ALIAS') REPLACE DESCR('TDCS alias queue') DEFPSIST(NO) TARGQ('CLUS.TDCS.SEND')
DEFINE QALIAS('TTS.SEND.ALIAS') REPLACE DESCR('TTS alias queue') DEFPSIST(NO) TARGQ('CLUS.TDCS.SEND')
DEFINE QALIAS('TSS.SEND.ALIAS') REPLACE DESCR('TSS alias queue') DEFPSIST(NO) TARGQ('CLUS.TDCS.SEND')
DEFINE QALIAS('RIDE.SEND.ALIAS') REPLACE DESCR('RIDE alias queue') DEFPSIST(NO) TARGQ('CLUS.TDCS.SEND')
DEFINE QALIAS('FCSS.SEND.ALIAS') REPLACE DESCR('FCSS alias queue') DEFPSIST(NO) TARGQ('CLUS.FCSS.SEND')

DEFINE QLOCAL('TDCS.STREAM') REPLACE DESCR('TDCS Stream queue')
DEFINE QLOCAL('TTS.STREAM') REPLACE DESCR('TTS Stream queue')
DEFINE QLOCAL('TSS.STREAM') REPLACE DESCR('TSS Stream queue')
DEFINE QLOCAL('RIDE.STREAM') REPLACE DESCR('RIDE Stream queue')
DEFINE QLOCAL('FCSS.STRAM') REPLACE DESCR('FCSS Stream queue')

DEFINE QALIAS('TDCS.PUB.ALIAS') REPLACE REPLACE DESCR('TDCS alias Stream queue') DEFPSIST(NO) TARGQ('TDCS.STREAM')
DEFINE QALIAS('TTS.PUB.ALIAS') REPLACE REPLACE DESCR('TTS alias Stream queue') DEFPSIST(NO) TARGQ('TTS.STREAM')
DEFINE QALIAS('TSS.PUB.ALIAS') REPLACE REPLACE DESCR('TSS alias Stream queue') DEFPSIST(NO) TARGQ('TSS.STREAM')
DEFINE QALIAS('RIDE.PUB.ALIAS') REPLACE REPLACE DESCR('RIDE alias Stream queue') DEFPSIST(NO) TARGQ('RIDE.STREAM')
DEFINE QALIAS('FCSS.PUB.ALIAS') REPLACE REPLACE DESCR('FCSS alias Stream queue') DEFPSIST(NO) TARGQ('FCSS.STREAM')

DEFINE QLOCAL('TDCS.CONTROL') REPLACE DESCR('TDCS Control queue')
DEFINE QLOCAL('TTS.CONTROL') REPLACE DESCR('TTS Control queue')
DEFINE QLOCAL('TSS.CONTROL') REPLACE DESCR('TSS Control queue')
DEFINE QLOCAL('RIDE.CONTROL') REPLACE DESCR('RIDE Control queue')
DEFINE QLOCAL('FCSS.CONTROL') REPLACE DESCR('FCSS Control queue')

DEFINE QALIAS('TDCS.SUB.ALIAS') REPLACE REPLACE DESCR('TDCS alias Control queue') DEFPSIST(NO) TARGQ('TDCS.STREAM')
DEFINE QALIAS('TTS.SUB.ALIAS') REPLACE REPLACE DESCR('TTS alias Control queue') DEFPSIST(NO) TARGQ('TTS.STREAM')
DEFINE QALIAS('TSS.SUB.ALIAS') REPLACE REPLACE DESCR('TTS alias Control queue') DEFPSIST(NO) TARGQ('TTS.STREAM')
DEFINE QALIAS('RIDE.SUB.ALIAS') REPLACE REPLACE DESCR('RIDE alias Control queue') DEFPSIST(NO) TARGQ('RIDE.STREAM')
DEFINE QALIAS('FCSS.SUB.ALIAS') REPLACE REPLACE DESCR('FCSS alias Control queue') DEFPSIST(NO) TARGQ('FCSS.STREAM')

DEFINE LISTENER (ITSMMS.LISTENER) TRPTYPE(TCP) CONTROL(QMGR) PORT(2187)
START LISTENER(ITSMMS.LISTENER)

Thanks
Back to top
View user's profile Send private message
gs
PostPosted: Wed Nov 12, 2008 12:12 am    Post subject: Reply with quote

Master

Joined: 31 May 2007
Posts: 254
Location: Sweden

2 quick suggestions..

Tighten up channel security:
Code:

ALTER CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN) MCAUSER(NOUSER)
ALTER CHANNEL(SYSTEM.AUTO.RECEIVER) CHLTYPE(RCVR) MCAUSER(NOUSER)
ALTER CHANNEL(SYSTEM.AUTO.SVRCONN) CHLTYPE(SVRCONN) MCAUSER(NOUSER)
ALTER CHANNEL(SYSTEM.DEF.CLUSRCVR) CHLTYPE(CLUSRCVR) MCAUSER(NOUSER)
ALTER CHANNEL(SYSTEM.DEF.CLUSSDR) CHLTYPE(CLUSSDR) MCAUSER(NOUSER)
ALTER CHANNEL(SYSTEM.DEF.RECEIVER) CHLTYPE(RCVR) MCAUSER(NOUSER)
ALTER CHANNEL(SYSTEM.DEF.REQUESTER) CHLTYPE(RQSTR) MCAUSER(NOUSER)
ALTER CHANNEL(SYSTEM.DEF.SENDER) CHLTYPE(SDR) MCAUSER(NOUSER)
ALTER CHANNEL(SYSTEM.DEF.SERVER) CHLTYPE(SVR) MCAUSER(NOUSER)
ALTER CHANNEL(SYSTEM.DEF.SVRCONN) CHLTYPE(SVRCONN) MCAUSER(NOUSER)


Increase max msg length of SDLQ:
Code:

ALTER QLOCAL(SYSTEM.DEAD.LETTER.QUEUE) DEFPSIST(YES) MAXMSGL(104857600)
Back to top
View user's profile Send private message
exerk
PostPosted: Wed Nov 12, 2008 12:17 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

One observation, and one question:

Do NOT put mqm as an MCAUSER - EVER!

Why are you defining some queues as XMITQ's?
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
exerk
PostPosted: Wed Nov 12, 2008 12:21 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

gs wrote:
Tighten up channel security:
Code:

ALTER CHANNEL(SYSTEM.DEF.CLUSSDR) CHLTYPE(CLUSSDR) MCAUSER(NOUSER)


Might this not require an exit to change the MCAUSER when a channel is auto-defined?
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
gs
PostPosted: Wed Nov 12, 2008 1:17 am    Post subject: Reply with quote

Master

Joined: 31 May 2007
Posts: 254
Location: Sweden

exerk wrote:
gs wrote:
Tighten up channel security:
Code:

ALTER CHANNEL(SYSTEM.DEF.CLUSSDR) CHLTYPE(CLUSSDR) MCAUSER(NOUSER)


Might this not require an exit to change the MCAUSER when a channel is auto-defined?


Very true, I forgot to mention that the script i posted is for a non-clustered environment.


Last edited by gs on Wed Nov 12, 2008 5:33 am; edited 1 time in total
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Wed Nov 12, 2008 4:53 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

gs wrote:
exerk wrote:
gs wrote:
Tighten up channel security:
Code:

ALTER CHANNEL(SYSTEM.DEF.CLUSSDR) CHLTYPE(CLUSSDR) MCAUSER(NOUSER)


Might this not require an exit to change the MCAUSER when a channel is auto-defined?


Very true, I forgot to mention that this is for a non-clustered environment.

then why do you call some queues CLUS..... ???
also the first set of QLOCALS are defined as XMITQ's and the you point aliases at them... ?

There are tools out there that could make your life a lot easier...
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
gs
PostPosted: Wed Nov 12, 2008 5:25 am    Post subject: Reply with quote

Master

Joined: 31 May 2007
Posts: 254
Location: Sweden

Whoops, my tired eyes overlooked the fact that the thread creator created a clustered qmgr and a very messy such.

Please disregard my foolish ramblings about the SYSTEM.DEF.CLUS* channels
Back to top
View user's profile Send private message
JosephGramig
PostPosted: Wed Nov 12, 2008 5:27 am    Post subject: Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1244
Location: Gold Coast of Florida, USA

Clearly samsam007 is building a cluster queue manager as you can see from his first few lines.

Setting the MCAUSER on out bound channels is useless and ignored.

Setting the MCAUSER to mqm on inbound channels other then SVRCONN is superfluous so long as the default objects have MCAUSER as blank. One security technique is to set the MCAUSER to a user with non administrative authority but enough to do the job that a channel needs to do on the inbound channels.

Any and all inbound channels with a blank MCAUSER expose your QMGR to anonymous administration (even if you implemented SSL).
Back to top
View user's profile Send private message AIM Address
Michael Dag
PostPosted: Wed Nov 12, 2008 5:51 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

and I mixed up samsam07's post with gs' comments about non clustering.

so that covers the name of the queues, containing CLUS. ...
still making them XMITQ's and then pointing Aliases at them makes absolutely no sense to me...
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
PeterPotkay
PostPosted: Wed Nov 12, 2008 10:55 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

exerk wrote:
gs wrote:
Tighten up channel security:
Code:

ALTER CHANNEL(SYSTEM.DEF.CLUSSDR) CHLTYPE(CLUSSDR) MCAUSER(NOUSER)


Might this not require an exit to change the MCAUSER when a channel is auto-defined?

The cluster does not use this channel for auto defining channels to other QMs. So its harmless, but pointless as Joseph mentioned, to set this.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Wed Nov 12, 2008 10:59 am    Post subject: Re: My first version of MQSC script Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

samsam007 wrote:
DEFINE QLOCAL('CLUS.TDCS.SEND') REPLACE DESCR('TDCS app gets message from') USAGE(XMITQ)
DEFINE QLOCAL('CLUS.TTS.SEND') REPLACE DESCR('TTS app gets message from') USAGE(XMITQ)
DEFINE QLOCAL('CLUS.TSS.SEND') REPLACE DESCR('TSS app gets message from') USAGE(XMITQ)
DEFINE QLOCAL('CLUS.RIDE.SEND') REPLACE DESCR('RIDE app gets message from') USAGE(XMITQ)
DEFINE QLOCAL('CLUS.FCSS.SEND') REPLACE DESCR('FCSS app gets message from') USAGE(XMITQ)

These are no good as is. If they are to be used for channels leaving the cluster to non clustered QMs, where are the channel definitions? And the XMITQs need to reference the channel definitions.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
samsam007
PostPosted: Wed Nov 12, 2008 2:23 pm    Post subject: Re: My first version of MQSC script Reply with quote

Centurion

Joined: 30 Oct 2008
Posts: 107

PeterPotkay wrote:
samsam007 wrote:
DEFINE QLOCAL('CLUS.TDCS.SEND') REPLACE DESCR('TDCS app gets message from') USAGE(XMITQ)
DEFINE QLOCAL('CLUS.TTS.SEND') REPLACE DESCR('TTS app gets message from') USAGE(XMITQ)
DEFINE QLOCAL('CLUS.TSS.SEND') REPLACE DESCR('TSS app gets message from') USAGE(XMITQ)
DEFINE QLOCAL('CLUS.RIDE.SEND') REPLACE DESCR('RIDE app gets message from') USAGE(XMITQ)
DEFINE QLOCAL('CLUS.FCSS.SEND') REPLACE DESCR('FCSS app gets message from') USAGE(XMITQ)

These are no good as is. If they are to be used for channels leaving the cluster to non clustered QMs, where are the channel definitions? And the XMITQs need to reference the channel definitions.


Thanks for all the comment.
I will have to fix them one by one. Can anyone show me how to implement the code as Peter said here?

Thanks
Back to top
View user's profile Send private message
samsam007
PostPosted: Wed Nov 12, 2008 3:03 pm    Post subject: Re: My first version of MQSC script Reply with quote

Centurion

Joined: 30 Oct 2008
Posts: 107

PeterPotkay wrote:
samsam007 wrote:
DEFINE QLOCAL('CLUS.TDCS.SEND') REPLACE DESCR('TDCS app gets message from') USAGE(XMITQ)
DEFINE QLOCAL('CLUS.TTS.SEND') REPLACE DESCR('TTS app gets message from') USAGE(XMITQ)
DEFINE QLOCAL('CLUS.TSS.SEND') REPLACE DESCR('TSS app gets message from') USAGE(XMITQ)
DEFINE QLOCAL('CLUS.RIDE.SEND') REPLACE DESCR('RIDE app gets message from') USAGE(XMITQ)
DEFINE QLOCAL('CLUS.FCSS.SEND') REPLACE DESCR('FCSS app gets message from') USAGE(XMITQ)

These are no good as is. If they are to be used for channels leaving the cluster to non clustered QMs, where are the channel definitions? And the XMITQs need to reference the channel definitions.


These queues are used by external applications with "Message Service Client for .NET" installed. I assumed these apps will use MQGET to get the message from these queues.

Do I need a XMITQ for each of these queue here? and how to make reference to the channel(s)?

Thanks
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed Nov 12, 2008 3:09 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9472
Location: US: west coast, almost. Otherwise, enroute.

Quote:
Do I need a XMITQ for each of these queue here? and how to make reference to the channel(s)?

You only need xmitqs for non-cluster SENDER channels.

Cluster qmgrs use CLUSSDR-CLUSRCVR channel pairs to connect to other cluster qmgrs. You do not define xmitqs for CLUSSDR channels.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Nov 12, 2008 3:09 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

A queue where an app puts messages to, or gets messages from, should NEVER be usage XMITQ. Only the qmgr should put msgs to such a queue. The channel agent is typically the only consumer of a queue with usage xmitq.

APP queues should always have usage(normal).

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » Clustering » My first version of MQSC script
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.