Author |
Message
|
guest468 |
Posted: Sat Jan 24, 2009 5:53 pm Post subject: PCF response date/time format |
|
|
Centurion
Joined: 30 May 2006 Posts: 146 Location: NY
|
Hi,
I am trying to print CMQCFC.MQCACF_LAST_GET_DATE and CMQCFC.MQCACF_LAST_GET_TIME without any luck.
As per java doc they both are integer but not sure how to format it to proper data/time format. (this is for MQCMD_INQUIRE_Q_STATUS)
Any help pls? |
|
Back to top |
|
 |
mqjeff |
Posted: Sun Jan 25, 2009 5:09 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I'm surprised that the "javadoc" says that they are integers.
The manual says that they are MQCFSTs, which are strings. It even shows what format they are in.
And, of course, all MQCACFs are strings, as all MQIACFs are integers. |
|
Back to top |
|
 |
guest468 |
Posted: Sun Jan 25, 2009 9:40 am Post subject: |
|
|
Centurion
Joined: 30 May 2006 Posts: 146 Location: NY
|
Thanks MQJeff,
Yeah weird, actually all of the CMQCFC parameters are listed as integers in javadoc.
btw, I tried string option too. But it displays nothing.
case CMQCFC.MQCACF_LAST_GET_DATE:
System.out.println ("Get Date " + (String)p.getValue() );
break;
Am I missing any casting option for date sub fields?
Thanks. |
|
Back to top |
|
 |
mqjeff |
Posted: Sun Jan 25, 2009 10:05 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
What javadoc?
For what?
The manual doesn't list it as an integer.
Also, why would you cast getValue when you could just getStringValue?
Thirdly, and most importantly. Are you sure that you're getting back anything at all for MQCACF_LAST_GET_DATE? Maybe the queue manager you're inquiring against doesn't support it, or hasn't been enabled to record it. |
|
Back to top |
|
 |
guest468 |
Posted: Sun Jan 25, 2009 11:58 am Post subject: |
|
|
Centurion
Joined: 30 May 2006 Posts: 146 Location: NY
|
|
Back to top |
|
 |
mqjeff |
Posted: Sun Jan 25, 2009 12:55 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
That document says that the field named MQCACF_LAST_GET_TIME is an integer, which it is. It's the integer value that identifies the particular PCF Parameter as being the last get time. The value of that parameter, however, is a String value.
Also, even if PCF did use internal MQ metrics, the queue manager didn't even bother to keep track of the last put time and last get time until at least v6. If you were to search every last byte of all of the qmgr's data, you would not find the information.
Another good reason to upgrade to v6 or v7. |
|
Back to top |
|
 |
guest468 |
Posted: Sun Jan 25, 2009 2:07 pm Post subject: |
|
|
Centurion
Joined: 30 May 2006 Posts: 146 Location: NY
|
Thanks for the info. My java sucks.
And we have V7 in most of the servers just some legacy servers are still on 5.3 |
|
Back to top |
|
 |
|