Author |
Message
|
sfari |
Posted: Wed Oct 13, 2004 1:03 am Post subject: Problem with PCF |
|
|
Centurion
Joined: 15 Apr 2003 Posts: 144
|
Hi,
I am trying to do a runmqsc within my Java program to inquire a mainframe queue manager. I am doing this using an escaped PCF command and send it to the host queue managers SYSTEM.INPUT.COMMAND queue. As far as I understand it should be possible to use escaped runmqsc commands on z/OS, is that correct? The command server returns an invalid answer (I attached the code below). Is there an other possibility to run a runmqsc command on a z/OS queue manager within a Java program?
Thanks,
Silvano
Code: |
// Create an escaped PCF request to inquired z/OS queue manager
PCFMessage request = new PCFMessage(CMQCFC.MQCMD_ESCAPE);
request.addParameter(CMQCFC.MQIACF_ESCAPE_TYPE, CMQCFC.MQET_MQSC);
request.addParameter(CMQCFC.MQCACF_ESCAPE_TEXT, "dis q(Q.EPLATFORM.LDAPREQ)");
// Write request into MQMessage
MQMessage msg = new MQMessage();
request.write(msg);
// Configure settings for reply message
msg.replyToQueueName = "Q.EPLATFORM.IVP";
msg.replyToQueueManagerName = "C004501A.SUN.T";
msg.userId = "#T1QMMS";
// Put options
MQPutMessageOptions opt = new MQPutMessageOptions();
opt.options = MQC.MQPMO_SET_IDENTITY_CONTEXT;
// Send msg to remote qm
MQQueueManager qm = new MQQueueManager("");
qm.put("SYSTEM.COMMAND.INPUT", "T1QM", msg, opt);
|
|
|
Back to top |
|
 |
vennela |
Posted: Wed Oct 13, 2004 4:41 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
I don't think z/OS supports PCF messages yet.
However you can send the z/OS command server clear MQSC commands and it will process for you.
There is a support pac (that's a java program) MS16 which is exactly what you need. |
|
Back to top |
|
 |
sfari |
Posted: Wed Oct 13, 2004 7:38 am Post subject: |
|
|
Centurion
Joined: 15 Apr 2003 Posts: 144
|
Thanks, that's exactly what I am looking for! |
|
Back to top |
|
 |
sfari |
Posted: Fri Oct 15, 2004 5:27 am Post subject: |
|
|
Centurion
Joined: 15 Apr 2003 Posts: 144
|
This simple way of sending runmqsc commands does not work on Solaris right?
Or may I am doing something wrong, because I get some cryptic data when I send the same commands which work on z/OS to the command queue of a Solaris queue manager.
I am developing a Java program to fire runmqsc commands to queue managers running on Solaris or z/OS. As I understand i need to use escaped PCF for Solaris, right? |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Oct 15, 2004 5:34 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
sfari wrote: |
This simple way of sending runmqsc commands does not work on Solaris right?
Or may I am doing something wrong, because I get some cryptic data when I send the same commands which work on z/OS to the command queue of a Solaris queue manager.
I am developing a Java program to fire runmqsc commands to queue managers running on Solaris or z/OS. As I understand i need to use escaped PCF for Solaris, right? |
You need some way to detect if the queue manager is z/OS or not.
If it is not z/OS, then you should use the PCF message classes in MS0B. Don't spend work writing code you don't need to write. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
sfari |
Posted: Fri Oct 15, 2004 6:26 am Post subject: |
|
|
Centurion
Joined: 15 Apr 2003 Posts: 144
|
Thanks for your answer! Spend work on code I don't need to write is exactly what I want to avoid!
Thus I would like to use the same code for both platforms but I think this is not possible, right?
It seems that Solaris QM is not able to process simple runmqsc commands in MQ string messages. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Oct 15, 2004 9:17 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Search for the support pack for PCF commands. Distributed environments (non MF) need to be addressed with PCF commands.
Enjoy  |
|
Back to top |
|
 |
|