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 API Support » How to get MQCFGR object out of activity report data sectio?

Post new topic  Reply to topic
 How to get MQCFGR object out of activity report data sectio? « View previous topic :: View next topic » 
Author Message
amitgoelamit
PostPosted: Tue Jul 29, 2008 4:54 am    Post subject: How to get MQCFGR object out of activity report data sectio? Reply with quote

Novice

Joined: 19 Jul 2008
Posts: 20

Hi

I am trying to read activity report and got some success in that.

As per Activity Report format given in chapter 13 of 'Monitoring WebSpehere MQ 6.0' the report has

    1. Message Descriptor: which is MQMD

    2. Message Data: has two parts
    i. Embedded PCF header MQEPH structure - which also has PCF Header (MQCFH)
    ii. Activity report message data - MQCFGR that has
    a. activityappname,
    b. activityappltype,
    c. activitydescription,
    d. Operation - it has MQMD and optional Embedded MQMD structure
    e. TraceRoute




I was able to get the header information by using
Code:

               MQMessage message = new MQMessage ();
               MQGetMessageOptions gmo = new MQGetMessageOptions ();
              
              
               gmo.options = MQC.MQGMO_BROWSE_NEXT | MQC.MQGMO_NO_WAIT | MQC.MQGMO_CONVERT;

              // while (true)
              // {
                   message.messageId = null;
                   message.correlationId = null;
                   //PCFMessage p = new PCFMessage(message);
                   queue.get (message, gmo);

                   //     message.* apis to get all header information
               String applOriginData = message.applicationOriginData;
               int feedback = message.feedback;
               String format = message.format;
               int CCSID = message.characterSet;
               String applIdData = message.applicationIdData;





Also was able to read till 2(i) Embedded PCF header MQEPH structure - which also has PCF Header (MQCFH) by using readInt and readStringOfCharLength() apis on MQMessage

Code:
      mqMessage.seek(0); //Set read position back to the beginning of Message Data part
         int datalength, offset;
         
         datalength = mqMessage.getDataLength();
           offset = mqMessage.getDataOffset();
            System.out.println("datalength:"+ datalength + ", offset:"+offset);

         String ephStrucID        = mqMessage.readStringOfCharLength(4); //MQC.MQEPH_STRUC_ID
         datalength = mqMessage.getDataLength();
           offset = mqMessage.getDataOffset();
            System.out.println("datalength:"+ datalength + ", offset:"+offset);
           
         int ephVersion        = mqMessage.readInt();     //MQEPH_VERSION_1
         datalength = mqMessage.getDataLength();
           offset = mqMessage.getDataOffset();
            System.out.println("datalength:"+ datalength + ", offset:"+offset);
 


I have following questions:

How to use the the MQCFH, MQMD, MQCFGR data in the data section of activity report into the respective classes (MQCFH, MQMD, MQCFGR) in java.



I tried using

Code:
MQCFH mqcfh = (MQCFH)mqMessage.readObject();
and
MQCFH mqcfh = new MQCFH(mqMessage)

MQCFGR mqcfgr = (MQCFGR)mqMessage.readObject();
and
MQCFGR mqcfgr= new MQCFGR(mqMessage)


but, it didnt work.. threw

java.io.StreamCorruptedException: invalid stream header

Also tried
Code:
PCFMessage pcf = new PCFMessage(mqMessage);


so, in case can get pcf handle then may try using getParameter() methods to get handle on MQCFGR object etc.
but, it threw

com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 3001


any suggestion .. guidance !!!!
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 API Support » How to get MQCFGR object out of activity report data sectio?
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.