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 » IBM MQ Java / JMS » PCF Create Local Queue

Post new topic  Reply to topic
 PCF Create Local Queue « View previous topic :: View next topic » 
Author Message
mamahk
PostPosted: Thu Apr 03, 2014 7:16 pm    Post subject: PCF Create Local Queue Reply with quote

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
View user's profile Send private message
mamahk
PostPosted: Thu Apr 03, 2014 7:27 pm    Post subject: Reply with quote

Newbie

Joined: 03 Apr 2014
Posts: 3

The PCF documentation I am having trouble with.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Fri Apr 04, 2014 9:02 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3252
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
View user's profile Send private message Visit poster's website
mamahk
PostPosted: Sun Apr 06, 2014 4:13 pm    Post subject: Reply with quote

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
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 » IBM MQ Java / JMS » PCF Create Local Queue
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.