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 » General IBM MQ Support » How to define a service

Post new topic  Reply to topic
 How to define a service « View previous topic :: View next topic » 
Author Message
jim
PostPosted: Thu Aug 07, 2014 1:42 am    Post subject: How to define a service Reply with quote

Voyager

Joined: 26 Nov 2013
Posts: 94

How to define a MQ service which can call two command in startcmd ?

STARTCMD(' ')
STARTARG('')
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Aug 07, 2014 1:54 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Incredible as it may seem, the process of how to define a Service, and the values of each attribute of a Service, are contained within a publication known as the Knowledge Centre. And, googling 'mqseries define service' turns up a hit from IBM showing you how, right at the top of the page...
_________________
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
jim
PostPosted: Thu Aug 07, 2014 2:04 am    Post subject: Reply with quote

Voyager

Joined: 26 Nov 2013
Posts: 94

exerk wrote:
Incredible as it may seem, the process of how to define a Service, and the values of each attribute of a Service, are contained within a publication known as the Knowledge Centre. And, googling 'mqseries define service' turns up a hit from IBM showing you how, right at the top of the page...


I know that ..My question is Can I provide two command in this arguement STARTCMD
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Aug 07, 2014 2:17 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

jim wrote:
exerk wrote:
Incredible as it may seem, the process of how to define a Service, and the values of each attribute of a Service, are contained within a publication known as the Knowledge Centre. And, googling 'mqseries define service' turns up a hit from IBM showing you how, right at the top of the page...


I know that ..My question is Can I provide two command in this arguement STARTCMD

My question is, why would you want to?
_________________
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
jim
PostPosted: Thu Aug 07, 2014 3:13 am    Post subject: Reply with quote

Voyager

Joined: 26 Nov 2013
Posts: 94

exerk wrote:
jim wrote:
exerk wrote:
Incredible as it may seem, the process of how to define a Service, and the values of each attribute of a Service, are contained within a publication known as the Knowledge Centre. And, googling 'mqseries define service' turns up a hit from IBM showing you how, right at the top of the page...


I know that ..My question is Can I provide two command in this arguement STARTCMD

My question is, why would you want to?


I just need to restart the one of my component So Iam thinking of writing stop cmd and start cmd in STARTCMD attibute
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Aug 07, 2014 3:23 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

From the IBM example:

Code:
STARTCMD('C:\Program Files\IBM\Websphere MQ\bin\runmqtrm') +
STARTARG('-m +QMNAME+ -q MY.INITQ') +
STOPCMD('C:\Program Files\IBM\Websphere MQ\bin\amqsstop') +
STOPARG('-m +QMNAME+ -p +MQ_SERVER_PID+') +

Stopping and starting the Service is then achieved using the appropriate command, so a 'restart' would be done that way. Or is that you specify STARTONLY in your definition?
_________________
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
mqjeff
PostPosted: Thu Aug 07, 2014 5:38 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

jim wrote:
exerk wrote:
jim wrote:
exerk wrote:
Incredible as it may seem, the process of how to define a Service, and the values of each attribute of a Service, are contained within a publication known as the Knowledge Centre. And, googling 'mqseries define service' turns up a hit from IBM showing you how, right at the top of the page...


I know that ..My question is Can I provide two command in this arguement STARTCMD

My question is, why would you want to?


I just need to restart the one of my component So Iam thinking of writing stop cmd and start cmd in STARTCMD attibute


Right, so. The service object under the covers ends up doing some kind of process start command, which ends up being equivalent to the same thing you do when you type something into a command prompt on the system and then hit the enter key.

So you can either figure out how to write something that runs both commands from a command prompt, with you only hitting enter once... or you can write a shell script that does both commands, using the normal shell scripting language for your platform.

If you want to be a good MQ administrator, you also need to be a good system administrator for the platforms running MQ.
Back to top
View user's profile Send private message
jim
PostPosted: Fri Aug 08, 2014 7:08 am    Post subject: Reply with quote

Voyager

Joined: 26 Nov 2013
Posts: 94

mqjeff wrote:
jim wrote:
exerk wrote:
jim wrote:
exerk wrote:
Incredible as it may seem, the process of how to define a Service, and the values of each attribute of a Service, are contained within a publication known as the Knowledge Centre. And, googling 'mqseries define service' turns up a hit from IBM showing you how, right at the top of the page...


I know that ..My question is Can I provide two command in this arguement STARTCMD

My question is, why would you want to?


I just need to restart the one of my component So Iam thinking of writing stop cmd and start cmd in STARTCMD attibute


Right, so. The service object under the covers ends up doing some kind of process start command, which ends up being equivalent to the same thing you do when you type something into a command prompt on the system and then hit the enter key.

So you can either figure out how to write something that runs both commands from a command prompt, with you only hitting enter once... or you can write a shell script that does both commands, using the normal shell scripting language for your platform.

If you want to be a good MQ administrator, you also need to be a good system administrator for the platforms running MQ.


Yes. We can do by writing a script but I need to place that on the server so I want option to place the two cmd in the STARTCMD attribute.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Aug 08, 2014 7:24 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

jim wrote:
Yes. We can do by writing a script but I need to place that on the server so I want option to place the two cmd in the STARTCMD attribute.


Well. Open up a command prompt. Type in the two commands on one line, such that you don't have to hit enter.

Fiddle with that until it works.

Put that in STARTCMD.

STARTCMD does nothing magical. It just runs a shell.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Aug 08, 2014 8:11 am    Post subject: Reply with quote

Poobah

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

Perhaps a command separator character.
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » How to define a service
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.