|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Reason 3013 |
« View previous topic :: View next topic » |
Author |
Message
|
d |
Posted: Mon Jun 03, 2002 3:08 am Post subject: Reason 3013 |
|
|
Apprentice
Joined: 24 May 2002 Posts: 25
|
Hi,
I'm getting PCF error 3013 (MQRCCF_STRUCTURE_TYPE_ERROR) when I'm trying to retrieve channel status. I'm not very sure of the parameters to set to obtain this(in Java)......
Can anyone help me regarding this ??
Thanks in advance,
d |
|
Back to top |
|
 |
gvpatil |
Posted: Wed Jun 05, 2002 10:01 am Post subject: Here is the one that I am using... |
|
|
 Newbie
Joined: 18 Jan 2002 Posts: 9
|
Here is the one that I am using ..
getallchstatus returns a vector of chstus. Class chstatus is like
Code: |
public class chstatus {
public String chname;
public String chtype;
public String status;
public chstatus() {
}
} |
Exact function is...
Code: |
public Vector getallchstatus() throws Exception
{
Vector allmsg = new Vector();
PCFAgent agent;
PCFParameter [] parameters =
{
new MQCFST (CMQCFC.MQCACH_CHANNEL_NAME, "*"),
};
MQMessage [] responses;
MQCFH cfh;
PCFParameter pcf;
String name = null;
Integer status = new Integer(0);
Integer chtype = new Integer(0);
try
{
this.write("In qmgrseechn Using " + this.getProperties() );
agent = new PCFAgent(hostname,port,channel);
// Connect a PCFAgent to the specified queue manager
// Use the agent to send the request
responses = agent.send (CMQCFC.MQCMD_INQUIRE_CHANNEL_STATUS, parameters);
for (int i = 0; i < responses.length; i++)
{
cfh = new MQCFH (responses [i]);
// Check the PCF header (MQCFH) in the response message
if (cfh.reason == 0)
{
for (int j = 0; j < cfh.parameterCount; j++)
{
// Extract what we want from the returned attributes
pcf = PCFParameter.nextParameter (responses [i]);
switch (pcf.getParameter ())
{
case CMQCFC.MQCACH_CHANNEL_NAME:
name = (String) pcf.getValue ();
break;
case CMQCFC.MQIACH_CHANNEL_STATUS:
status = (Integer) pcf.getValue ();
break;
case CMQCFC.MQIACH_CHANNEL_TYPE:
chtype = (Integer) pcf.getValue();
break;
default:
}
}
chstatus chstatus1 = new chstatus();
chstatus1.chname = name;
switch (status.intValue())
{
case CMQCFC.MQCHS_INACTIVE:
chstatus1.status="INACTIVE";
break;
case CMQCFC.MQCHS_BINDING:
chstatus1.status="BINDING";
break;
case CMQCFC.MQCHS_STARTING:
chstatus1.status="STARTING";
break;
case CMQCFC.MQCHS_RUNNING:
chstatus1.status="RUNNING";
break;
case CMQCFC.MQCHS_STOPPING:
chstatus1.status="STOPPING";
break;
case CMQCFC.MQCHS_RETRYING:
chstatus1.status="RETRYING";
break;
case CMQCFC.MQCHS_STOPPED:
chstatus1.status="STOPPED";
break;
case CMQCFC.MQCHS_REQUESTING:
chstatus1.status="REQUESTING";
break;
case CMQCFC.MQCHS_PAUSED:
chstatus1.status="PAUSED";
break;
case CMQCFC.MQCHS_INITIALIZING:
chstatus1.status="INITIALIZING";
break;
default:
}
switch (chtype.intValue())
{
case 1:
chstatus1.chtype="SENDER";
break;
case 2:
chstatus1.chtype="SERVER";
break;
case 3:
chstatus1.chtype="RECEIVER";
break;
case 4:
chstatus1.chtype="REQUESTER";
break;
case 5:
chstatus1.chtype="ALL";
break;
case 6:
chstatus1.chtype="CLNTCONN";
break;
case 7:
chstatus1.chtype="SVRCONN";
break;
case 8:
chstatus1.chtype="CLUSRCVR";
break;
case 9:
chstatus1.chtype="CLUSSDE";
break;
default:
}
allmsg.add(chstatus1);
this.write ("Channel " + name + " type "+ chstatus1.chtype + " status " + chstatus1.status);
}else
{
this.write ("PCF error:\n" + cfh);
// Walk through the returned parameters describing the error
for (int j = 0; j < cfh.parameterCount; j++)
{
this.write (PCFParameter.nextParameter (responses [0]).toString());
}
}
}
agent.disconnect();
}catch (MQException mqe){
this.write("An MQ error occurred : Completion code " +
mqe.completionCode +
" Reason code " + mqe.reasonCode);
throw mqe;
}finally { // Disconnect & return
return allmsg;
}
} |
Enjoy  |
|
Back to top |
|
 |
d |
Posted: Thu Jun 06, 2002 12:35 am Post subject: |
|
|
Apprentice
Joined: 24 May 2002 Posts: 25
|
Hi gvpatil,
Thanks a lot for your time & help...you really made my day!
deepa |
|
Back to top |
|
 |
leot |
Posted: Fri Oct 03, 2003 4:55 am Post subject: |
|
|
Novice
Joined: 21 Apr 2002 Posts: 24 Location: NYC
|
Thanks from another desperate programmer! It would've taken me ages to figure this stuff out myself. |
|
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
|
|
|
|