|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
PCF Create Local Queue |
« View previous topic :: View next topic » |
Author |
Message
|
mamahk |
Posted: Thu Apr 03, 2014 7:16 pm Post subject: PCF Create Local Queue |
|
|
Newbie
Joined: 03 Apr 2014 Posts: 3
|
Hi all,
I am working on a task that required translating MQSC cmd to PCF.
As "Programmable Command Formats and Administration Interface v7.0" stated (page 104) , PROPCTL in PCF is MQIA_PROPERTY_CONTROL and MQPROP_COMPATIBILITY is valid parameter value for it. However, the program is getting 3014 reason code for invalid integer parameter is supplied.
I may miss out some important rules about reading IBM documentation. Looks like information on the lines started with "|" are invalid in the document.
Here is the code I tried to test the parameter for create local queue. I run this code with the v7.1 jar. I have commented out the lines that return error.
Any idea would be appreciated.
Code: |
import java.io.IOException;
import com.ibm.mq.MQException;
import com.ibm.mq.constants.MQConstants;
import com.ibm.mq.pcf.PCFException;
import com.ibm.mq.pcf.PCFMessage;
import com.ibm.mq.pcf.PCFMessageAgent;
public class PCF_Testing {
/**
* @param args
*/
public static void main(String[] args) {
try {
PCFMessageAgent agent = new PCFMessageAgent("hostname", 1424, "CHANNEL");
agent.setCheckResponses(false);
PCFMessage[] responses;
PCFMessage request = new PCFMessage(MQConstants.getIntValue("MQCMD_CREATE_Q"));
request.addParameter(MQConstants.getIntValue("MQCA_Q_NAME"), "TESTING.KSM526.1");
request.addParameter(MQConstants.getIntValue("MQIA_Q_TYPE"), MQConstants.getIntValue("MQQT_LOCAL"));
request.addParameter(MQConstants.getIntValue("MQCA_Q_DESC"), "");
request.addParameter(MQConstants.getIntValue("MQIA_INHIBIT_PUT"), MQConstants.getIntValue("MQQA_PUT_ALLOWED"));
request.addParameter(MQConstants.getIntValue("MQIA_DEF_PRIORITY"), 0);
// request.addParameter(MQConstants.getIntValue("MQIA_DEF_PERSISTENCE"), MQConstants.getIntValue("MQPER_PERSISTENT"));
// request.addParameter(MQConstants.getIntValue("MQIA_DEF_PUT_RESPONSE_TYPE"), MQConstants.getIntValue("MQPRT_ASYNC_RESPONSE"));
// request.addParameter(MQConstants.getIntValue("MQIA_PROPERTY_CONTROL"), MQConstants.getIntValue("MQPROP_ALL"));
responses = agent.send(request);
for (PCFMessage msg : responses ){
System.out.println(msg.getCompCode());
System.out.println( msg.getReason());
}
} catch (PCFException pcfe) {
System.err.println ("PCF error: " + pcfe.getMessage());
} catch (MQException mqe){
System.err.println ("mq error:" + mqe.getMessage());
} catch (IOException e) {
e.printStackTrace();
}
}
} |
|
|
Back to top |
|
 |
mamahk |
Posted: Thu Apr 03, 2014 7:27 pm Post subject: |
|
|
Newbie
Joined: 03 Apr 2014 Posts: 3
|
|
Back to top |
|
 |
RogerLacroix |
Posted: Fri Apr 04, 2014 9:02 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
What version is your queue manager? It may not supported that particular parameter.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
mamahk |
Posted: Sun Apr 06, 2014 4:13 pm Post subject: |
|
|
Newbie
Joined: 03 Apr 2014 Posts: 3
|
Thanks for pointing out.
Just checked the version of queue manager and it is 6.0 and those parameters are only introduced in 7.0.
Problem solved.....  |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|