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 IndexUser ExitsMessage exit and MQSC Commands

Post new topicReply to topic Goto page 1, 2  Next
Message exit and MQSC Commands View previous topic :: View next topic
Author Message
MaxP
PostPosted: Tue Jan 22, 2013 10:39 pm Post subject: Message exit and MQSC Commands Reply with quote

Newbie

Joined: 22 Jan 2013
Posts: 9

Hi There,

Has anyone written a channel message exit which puts MQSC commands on the system command input queue? Platform is zOS.

Regards,
Max
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Tue Jan 22, 2013 11:43 pm Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

Hello,

yes, or at least something very close to it.

* I have written messages exits that are putting (additional) messages to queues.

* I have written security exits that are putting messages to system.command.input and that are reading the reply

Both on z/OS. Whats your specific question about it ?!?
_________________
Regards, Butcher
Back to top
View user's profile Send private message
MaxP
PostPosted: Wed Jan 23, 2013 3:55 pm Post subject: Reply with quote

Newbie

Joined: 22 Jan 2013
Posts: 9

Thanks Mr Butcher for your reply. I am writing a message exit which does the same thing as you have achieved with your security exits - i.e. put a MQSC command to system.command.input and read the reply. I've just hit a bit of an impasse - no messages are being PUT to my reply queue. I developed the code under CICS (and all worked well), before amending it to run as a channel exit. I was just questioning whether I was missing something fundamental (such as it can't be done), with the MQ manuals being less than verbose when discussing channel exits. It's probably some MQMD field that I'm not setting correctly. Any 'traps for young players' that you can think of?

Regards,
Max
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed Jan 23, 2013 4:37 pm Post subject: Reply with quote

Poobah

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

You have provided very, very little information - other than your exit didn't receive a reply.

Did your exit successfully put a message to the system command input queue? How do you know?

Any errors logged in CHIN SYSLOG? In qmgr SYSLOG? Did the exit get instantiated?
_________________
I didn't know that Schrdinger had a cat.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Jan 23, 2013 4:45 pm Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17448

Am I the only one horrified at the notion of a message exit performing administration on my queue manager?
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed Jan 23, 2013 5:09 pm Post subject: Reply with quote

Poobah

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

mqjeff wrote:
Am I the only one horrified at the notion of a message exit performing administration on my queue manager?

That would be me.
_________________
I didn't know that Schrdinger had a cat.
Back to top
View user's profile Send private message
MaxP
PostPosted: Wed Jan 23, 2013 6:36 pm Post subject: Reply with quote

Newbie

Joined: 22 Jan 2013
Posts: 9

Well we all have our own notions of horror, Bruce and Jeff, but there you are. Thanks for you diagnosis tips Bruce and for making me google instantiate. It would seem that Mr Butcher is already successfully performing said administration from an exit. Perhaps you could ask him if his world has ended Mayan style? My query was more is anyone doing this/is it possible. As I've said, the code worked fine when I developed it under CICS, but is not going as planned now that I've turned it into an exit. I am assuming that CICS was guarding me from the ludicrously large number of field/byte/bit settings that one must make in the MD/OD etc, to keep MQ happy.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed Jan 23, 2013 7:39 pm Post subject: Reply with quote

Poobah

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

How was this implemented in CICS? GLUE? TRUE? Something else?

Way back when, I wrote CICS exits. It was a fun time.
_________________
I didn't know that Schrdinger had a cat.
Back to top
View user's profile Send private message
MaxP
PostPosted: Wed Jan 23, 2013 8:11 pm Post subject: Reply with quote

Newbie

Joined: 22 Jan 2013
Posts: 9

Just a linked to CICS application program:
Open request queue
Open reply queue
Put a message to request queue
Get messages from reply queue
Format a record with required fields extracted from the reply queue messages, and output this somewhere
Close request queue
Close reply queue
Leave quietly

Now as a channel exit (using CSQ4BAX0 as a model):
Getmain my storage
Find MQXQH and then message from passed parameters (based on hearsay, as it is not particularly well documented in the Intercommnuication Guide)
MQCONN
Open request queue
Open reply queue
Put a message to request queue
Get messages from reply queue
Format a record with required fields extracted from the message that MCA has GET from xmitq, and reply queue messages, and output this somewhere
Close request queue
Close reply queue
Freemain my storage
Leave quietly
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed Jan 23, 2013 9:00 pm Post subject: Reply with quote

Poobah

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

How exactly are you testing?
_________________
I didn't know that Schrdinger had a cat.
Back to top
View user's profile Send private message
MaxP
PostPosted: Wed Jan 23, 2013 9:16 pm Post subject: Reply with quote

Newbie

Joined: 22 Jan 2013
Posts: 9

The exit is now implemented on a particular sender channel. I'm sending a message from a CICS application across this channel to drive the exit.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Jan 24, 2013 2:56 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17448

How are you observing the running of the exit? That is, what method are you using to show that the exit is running, and see what it is or is not doing?

What behavior are you seeing? Is it working? Not working?

I can construct a scenario in which this seems like a good thing to do - you can create your own private format of administrative messages, including allowing you room to implement your own additional security layer.

But it seems a bit of a long way around to avoid the built-in methods of doing these things.

However, that's not my problem. I was just concerned that I was missing something - that nobody else thought this was a bad idea at all.
Back to top
View user's profile Send private message
markt
PostPosted: Thu Jan 24, 2013 3:37 am Post subject: Reply with quote

Partisan

Joined: 14 May 2002
Posts: 387

I bet it's syncpoint behaviour.
Back to top
View user's profile Send private message
MaxP
PostPosted: Thu Jan 24, 2013 4:46 am Post subject: Reply with quote

Newbie

Joined: 22 Jan 2013
Posts: 9

mqjeff, I'm issuing WTOs from within the code to show where I am in the exit. I am also writing various fields out to a sequential dataset allocated to the CHIN. This exercise has nada to do with security. The exit is running and I am doing a MQPUT to SYSTEM.COMMAND.INPUT - just nothing is coming back to my replyq, unlike when I test under CICS. Undoubtedly there are built in methods for achieving my goal, but we are a facilities manager for external clients, and I was hoping to implement something which does not require my client to make code changes.

markt, what does that mean?

Mr Butcher, if you are still there, what version of MQ are you? What does your PMO and OD look like when you are MQPUTing to SYSTEM.COMMAND.INPUT.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Jan 24, 2013 4:56 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17448

What markt means, and what your description of the symptoms imply, is that your PCF request message is being sent inside a transaction. This transaction is not being committed before you try and get the response from that request.

So you need to take steps to ensure your PCF messages are sent and received *outside* of a syncpoint.

Again, apologies if I'm derailing this conversation a bit, but as a 'facilities manager for external clients', it would seem to me that you could use purchase/use any MQ management tool, and use that through normal means - without requiring that your customers change any of their code, but merely requiring that a certain amount of initial configuration to ensure that your management tool has necessary access to the MQ resources it needs (event queues, command queue, etc.).

But I also admit that I don't know what a 'facilities manager for external clients' is, exactly, nor what kinds of business relationships you have with your customers.

But again, if the point of this exercise is to administer the queue manager or gather metrics and statistics on the use of the queue manager, it would seem more straightforward to me to use the normal methods of doing that, rather than building your own.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum IndexUser ExitsMessage exit and MQSC Commands
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.