Note that there are some explanatory texts on larger screens.

plurals
  1. PORead Parameters in a PCF message from Channel event queue
    primarykey
    data
    text
    <p>I'm using mo01 java support pack to read event messages from SYSTEM.ADMIN.CHANNEL.EVENT Queue .</p> <p>Below is the link to code:</p> <p><a href="http://www-01.ibm.com/support/docview.wss?uid=swg24000676" rel="nofollow">mo01java</a></p> <p>I can able to read all parameter name/value from the PCF Message consumed from channel event queue except the below parameter,</p> <pre> ReasonQualifier Specifies the identifier that qualifies the reason code. Identifier MQIACF_REASON_QUALIFIER. Datatype MQCFIN. Values One of the following: MQRQ_CHANNEL_STOPPED_OK Channel has been closed with either a zero return code or a warning return code. MQRQ_CHANNEL_STOPPED_ERROR Channel has been closed, but there is an error reported and the channel is not in stopped or retry state. MQRQ_CHANNEL_STOPPED_RETRY Channel has been closed and it is in retry state. MQRQ_CHANNEL_STOPPED_DISABLED Channel has been closed and it is in a stopped state. Returned Always. </pre> <p>Below is the part of code,</p> <pre> Map reasonCodes = new HashMap(); /** Map of MQ command names and values. */ Map commands = new HashMap(); /** Map of MQ string names and values. */ Map stringNames = new HashMap(); private String getStringName(int stringInt) { return (String)stringNames.get(new Integer(stringInt)); } /** * Converts a constant integer to its MQ command name. * @param stringInt the MQ integer. * @return the MQ command name represented by the constant integer. */ private String getCommandName(int stringInt) { return (String)commands.get(new Integer(stringInt)); } // Below methods retrieves int code's string value from classes and store in HashMap public void setupMaps() { setupReasonNameSub("com.ibm.mq.pcf.CMQC", "MQRC", reasonCodes); setupReasonNameSub("com.ibm.mq.pcf.CMQCFC", "MQRC", reasonCodes); setupReasonNameSub("com.ibm.mq.pcf.CMQCFC", "MQCMD", commands); setupReasonNameSub("com.ibm.mq.pcf.CMQC", "MQCA", stringNames); setupReasonNameSub("com.ibm.mq.pcf.CMQCFC", "MQCA", stringNames); setupReasonNameSub("com.ibm.mq.pcf.CMQC", "MQIA", stringNames); setupReasonNameSub("com.ibm.mq.pcf.CMQC", "MQRQ", reasonCodes); } void readPCFMessage(PCFMessage pcfMessage){ Enumeration pcfEnum = pcfMessage.getParameters(); stdout = stdout + "" + getReasonName(pcfMessage.getReason()) + "\n"; while (pcfEnum.hasMoreElements()) { String parameterName; PCFParameter elt = (PCFParameter)pcfEnum.nextElement(); parameterName = getStringName(elt.getParameter()); stdout = stdout + ""; if (elt.getType() == CMQCFC.MQCFT_STRING_LIST) { String strings[] = (String[])elt.getValue(); for (int i = 0; i " + strings[i] + "\n"; } } else stdout = stdout + elt.getValue().toString(); stdout = stdout + "\n"; } System.out.println(stdout); } <pre> Output: MQRC_CHANNEL_STOPPED QMGR1 CHL.TO.CHLA SYSTEM.CLUSTER.TRANSMIT.QUEUE 172.21.33.123 9 0 0 0 CHL.TO.CHLA </pre> </pre> <p>If a channel is stopped , I want to know the exact reason on whether it is stopped with a issue or a normal OK. This parameter tells us the right reason on channel stopped. </p> <p>Any idea why this parameter is not retrievable?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload