3

I trying to create queues using PCF command in the WebSphere API as detailed in $MQM_HOME/samp/pcf/samples/PCF_CreateQeue.java. The creation fails when i add a description

command.addParameter(PCFConstants.MQCA_Q_DESC, "Created using MQMonitor");

I get the error: com.ibm.mq.pcf.PCFException: MQJE001: Completion Code 2, Reason 3015 : MQRCCF_CFST_PARM_ID_ERROR Is there another way of setting the description, i'm using version 6 of the API.

2 Answers 2

2

The Commands page in the PCF manual states that:

The required parameters and the optional parameters are listed. On platforms other than z/OS®, the parameters must occur in the order:

  1. All required parameters, in the order stated, followed by
  2. Optional parameters as required, in any order, unless specifically noted in the PCF definition.

The section Change, Copy and Create Queue lists the required parameters in the following order:

  1. MQCA_Q_NAME
  2. MQIA_Q_TYPE
  3. Optional parameters, including QDesc

The same manual provides required parameters and their order for all PCF commands so no need to play hide-and-seek trying out parms and orders in the future.

Sign up to request clarification or add additional context in comments.

Comments

1

It turns out the addParameter on the PCFMessage should in a certain sequence (stumbled on it). If i change the add parameters if works. This is not just for creating queues, but for channels as well.

command.addParameter(PCFConstants.MQCA_Q_NAME, qname);
command.addParameter(PCFConstants.MQIA_Q_TYPE, PCFConstants.MQQT_LOCAL);
command.addParameter(PCFConstants.MQCA_Q_DESC, qdesc);
command.addParameter(PCFConstants.MQIA_DEF_PERSISTENCE, PCFConstants.MQPER_PERSISTENT);

the above will execute without error.

command.addParameter(PCFConstants.MQCA_Q_NAME, qname);
command.addParameter(PCFConstants.MQCA_Q_DESC, qdesc);
command.addParameter(PCFConstants.MQIA_Q_TYPE, PCFConstants.MQQT_LOCAL);
command.addParameter(PCFConstants.MQIA_DEF_PERSISTENCE, PCFConstants.MQPER_PERSISTENT);

the above will fail after moving around the description.

I haven't seen it documented in the Java docs, and if thats the case i looks forward to some hide and seek.

1 Comment

I've ditched my initial answer and updated my response with links to the appropriate manuals. What you tripped over is documented, just not in the Java manual.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.