|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MS0P - MQIDecode difficulties |
« View previous topic :: View next topic » |
Author |
Message
|
PeterPotkay |
Posted: Mon Dec 21, 2009 8:16 am Post subject: MS0P - MQIDecode difficulties |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
The MS0P Support Pack has a little utility called MQIDecode.
From the ReadMe in C:\Program Files\IBM\WebSphere MQ\eclipseSDK33\eclipse\MS0P\mqidecode.
Quote: |
MQIDecode - a developer's aid for WebSphere MQ
----------------------------------------------
This is a simple tool to decode values in the
MQI. It turns a number into the corresponding symbolic
values.
You enter the number (either in decimal or hex) and
the prefix that defines which type of MQI value it is. The
prefix is the part of the symbolic name before the first
underscore. For example, use MQIACF or MQOO. If you use
the -n flag, then the underscore is not assumed. This would
allow matching, for example, to look in both MQIA and MQIACH
ranges.
By default, the number is treated as a bit mask (such as
in the Options field of most MQI structures); by specifying
the -e flag, the number is treated as an absolute value to
search for. When decoding the number as flags, unrecognised
values are shown.
Usage
-----
mqidecode [-p prefix] [-v value] [-m | -e] [-n]
Options:
-p : Prefix such as MQOO or MQAT
-v : Value in either decimal (eg 1234) or hexadecimal (eg 0x1234)
-m : The value is treated as a bit mask; decode each bit (default)
-e : The value is in an enumerated range
-n : Do not assume an underscore immediately after the prefix
The program returns 0 for success, non-zero for failure.
For example, to decode the Open Options flags:
$ ./mqidecode -p MQOO -v 0x10042456
MQOO_INPUT_SHARED (0x00000002)
MQOO_INPUT_EXCLUSIVE (0x00000004)
MQOO_OUTPUT (0x00000010)
MQOO_SET (0x00000040)
MQOO_SET_IDENTITY_CONTEXT (0x00000400)
MQOO_FAIL_IF_QUIESCING (0x00002000)
MQOO_RESOLVE_LOCAL_Q (0x00040000)
No definitions found for flags of value 0x10000000
To decode the MQ ApplicationType value:
$ ./mqidecode -p MQAT -v 6 -e
MQAT_AIX/MQAT_UNIX
Notes
-----
Sometimes a number may match more than one value. In such
cases, the possible values are all shown on a single line
separated with the '/' character.
Access to the MQ Java client jars are required for this program
to work because this program uses the MQConstants.lookup() method
from these classes. Scripts are provided for Unix and Windows
platforms that attempt to set the correct classpath entries. You
might need to edit these scripts to match your installation. |
I have MQ 7.0.1.0 and MS0P installed in the default locations on my PC.
This the contents of the mqidecode.bat file:
Code: |
@echo off
rem (C) IBM Corporation 2009
rem
rem SCCSID: @(#) com.ibm.mq.explorer.ms0p.mqidecode/src/mqidecode.bat, supportpacs, MS0P 1.1 09/07/18 16:08:12
rem
rem Set the MQ variable to point at your WebSphere MQ installation directory
set mq="c:\program files\ibm\websphere mq"
rem Then we need to set up the classpath to include the WebSphere MQ jar files
set c=%mq%\java\lib\com.ibm.mq.headers.jar
set c=%c%;%mq%\java\lib\com.ibm.mq.jmqi.jar
set c=%c%;%mq%\java\lib\com.ibm.mq.jar
rem And add the jar file we want to execute
set c=%c%;.\mqidecode.jar
rem
rem Note: If you want to use more than 9 parameters then you'll have to either
rem code them here or use a better shell.
rem
java -cp %c% MQIDecode %1 %2 %3 %4 %5 %6 %7 %8 %9 |
But I run into the following:
Code: |
C:\>cd C:\Program Files\IBM\WebSphere MQ\eclipseSDK33\eclipse\MS0P\mqidecode
C:\Program Files\IBM\WebSphere MQ\eclipseSDK33\eclipse\MS0P\mqidecode>dir
Directory of C:\Program Files\IBM\WebSphere MQ\eclipseSDK33\eclipse\MS0P\mqidecode
12/17/2009 08:39 PM <DIR> .
12/17/2009 08:39 PM <DIR> ..
07/22/2009 06:27 AM 765 mqidecode.bat
07/22/2009 06:27 AM 4,528 mqidecode.jar
07/22/2009 06:27 AM 458 mqidecode.ksh
07/22/2009 06:27 AM 2,385 README.txt
4 File(s) 8,136 bytes
2 Dir(s) 2,773,393,408 bytes free
C:\Program Files\IBM\WebSphere MQ\eclipseSDK33\eclipse\MS0P\mqidecode>mqidecode -p MQOO -v 8208
Exception in thread "main" java.lang.UnsupportedClassVersionError: MQIDecode (Unsupported major.mino
r version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
|
I think I have everything set up correctly. What should I check? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
Michael Dag |
Posted: Mon Dec 21, 2009 8:29 am Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
|
Back to top |
|
 |
mqjeff |
Posted: Mon Dec 21, 2009 8:40 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Michael Dag wrote: |
What java version are you running? (java -version) |
I'd add MSOP's eclipse Java to the start of the path. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon Dec 21, 2009 9:57 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Yup, the MS0P manual says Java 1.5 is required.
I got this.
Code: |
C:\>java -version
java version "1.3.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)
|
I don't see any java.exe in the MS0P dir, but if I get into the Websphere MQ install:
Code: |
C:\Program Files\IBM\WebSphere MQ\Java\jre\bin>java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pwi32dev-20070511 (SR5))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-20070426 (JIT enabled)
J9VM - 20070420_12448_lHdSMR
JIT - 20070419_1806_r8
GC - 200704_19)
JCL - 20070511 |
So it looks like I want to use that. Ok, I feel this devolving into Java 101, day 1 (Vitor, a little moral support, quick).
I looked at my PC's PATH variable and see this as the first entry:
C:\Program Files\IBM\WebSphere MQ\Java\lib
Should I add C:\Program Files\IBM\WebSphere MQ\Java\jre\bin in front of that? Worried that will break something else.
Geez, I alse see the following variables all set: MQ_JAVA_DATA_PATH, MQ_JAVA_INSTALL_PATH, MQ_JAVA_LIB_PATH, MQ_JRE_PATH, MQFT_JAVA_LIB_PATH, MQFT_JRE_BINPATH.
Isn't there a one liner I can throw in the mqidecode.bat file to specifically tell it what java to use? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
Vitor |
Posted: Mon Dec 21, 2009 10:04 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
PeterPotkay wrote: |
Ok, I feel this devolving into Java 101, day 1 (Vitor, a little moral support, quick). |
I'm feeling your pain, and I'm right behind you in this. About 4 miles back, but directly behind you.
Let not the evil that is Java assail you, nor the endless PATH & CLASSPATH entries confuse you. Be strong, be resolute and in time you'll stumble upon a configuration that works, and move slowly away before it changes it's mind.
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Michael Dag |
Posted: Mon Dec 21, 2009 10:11 am Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
if you are afraid of messing things up use SETLOCAL and ENDLOCAL in your batch files
Code: |
SETLOCAL
SET PATH=C:\Program Files\IBM\WebSphere MQ\Java\jre\bin;%PATH%
Do thingie you want to do...
ENDLOCAL |
_________________ Michael
MQSystems Facebook page |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Dec 21, 2009 10:14 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I'd thought MS0P would install standalone, and therefore include it's own full eclipse including it's own Java/jre/bin folder...
Regardless, yes. You should be able to edit mqsidecode.bat to add SET PATH=%mq%\Java\jre\bin;%PATH%
edit: SETLOCAL is useful too. |
|
Back to top |
|
 |
markt |
Posted: Mon Dec 21, 2009 10:48 am Post subject: |
|
|
 Knight
Joined: 14 May 2002 Posts: 508
|
Quote: |
I'd thought MS0P would install standalone |
Have you perhaps mixed it up with MS0T? |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon Dec 21, 2009 11:21 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
It works, thanks guys.
And thanks Mark for including this little utility in MS0P.
Code: |
@echo off
SETLOCAL
SET PATH=C:\Program Files\IBM\Websphere MQ\java\jre\bin;%PATH%
rem (C) IBM Corporation 2009
rem
rem SCCSID: @(#) com.ibm.mq.explorer.ms0p.mqidecode/src/mqidecode.bat, supportpacs, MS0P 1.1 09/07/18 16:08:12
rem
rem Set the MQ variable to point at your WebSphere MQ installation directory
set mq="c:\program files\ibm\websphere mq"
rem Then we need to set up the classpath to include the WebSphere MQ jar files
set c=%mq%\java\lib\com.ibm.mq.headers.jar
set c=%c%;%mq%\java\lib\com.ibm.mq.jmqi.jar
set c=%c%;%mq%\java\lib\com.ibm.mq.jar
rem And add the jar file we want to execute
set c=%c%;.\mqidecode.jar
rem
rem Note: If you want to use more than 9 parameters then you'll have to either
rem code them here or use a better shell.
rem
java -cp %c% MQIDecode %1 %2 %3 %4 %5 %6 %7 %8 %9
ENDLOCAL
|
_________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Dec 21, 2009 12:16 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
markt wrote: |
Quote: |
I'd thought MS0P would install standalone |
Have you perhaps mixed it up with MS0T? |
Yes, entirely. |
|
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
|
|
|
|