Author |
Message
|
PeterPotkay |
Posted: Sat Sep 02, 2006 7:42 am Post subject: Compare two MS03 output files |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Before reinventing the wheel here, maybe someone has done this and is willing to share.
I want to compare the MS03 output file for QM1 from today and yesterday, and spit out a file listing the changes, if any. Currently, we run MS03 on a Windows box and it client connects to every QM in our system every day, and creates a daily MS03 file. I would like to compare the days so we get an automated list every day of what changed. Probably easier on Unix, but I need to do this via Windows commands for the time being. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
RogerLacroix |
Posted: Sat Sep 02, 2006 8:16 am Post subject: Re: Compare two MS03 output files |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
PeterPotkay wrote: |
I want to compare the MS03 output file for QM1 from today and yesterday, and spit out a file listing the changes, if any. |
Hi,
You can use the Windows comp program to compare the 2 files.
If you are more of a Unix/Linux guy, then you can download GNU Utilities for Win32 from http://unxutils.sourceforge.net/ and use the standard diff program (on a Windows PC).
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Sep 02, 2006 8:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Did you try FC as in file compare ?
It has multiple flags you might want to look into.
fc /? will list them with a brief explanation
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
PeterPotkay |
Posted: Sat Sep 02, 2006 10:19 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Thanks for the feedback. The more I think of it, the more complex it gets.
When one attribute of a q changes, I would like to just list the q name, and the one attribute that changed.
I have to exclude lines that start with a *, since I dont want to be flagged on the 1st line of the MS03 output changing, which lists the date when it was run.
Its gotta be slick enough to list the queues / channels / procceses / namelists / listeners that got deleted or added, just by name is sufficient in my opinion.
I am interested to hear what Wayne has to say. Perhaps he has come across this functionality already in talking with some of the users of his utility. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
wschutz |
Posted: Sat Sep 02, 2006 10:38 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Hows:
diff -c -F DEFINE ms03.yesterday ms03.today
? _________________ -wayne |
|
Back to top |
|
 |
PeterPotkay |
Posted: Sat Sep 02, 2006 2:19 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Unfortunatly, that still flags the 2nd line in the MS03, since that line different between Day 1 and Day 2 as it shows the date.
The rest of the output can be deciphered with a bit of effort if you know what did in fact change. Kinda tough though if you don't know what changed.
Code: |
D:\MS03_Compare>diff -C 0 -F DEFINE -F ALTER DAY1.txt DAY2.txt>OUT.TXT |
Here's the output, what changed between Day 1 and Day 2? Imagine if there were a hundred QMs....
Code: |
*** DAY1.txt Sat Sep 02 18:13:12 2006
--- DAY2.txt Sat Sep 02 18:14:34 2006
***************
*** 2 ****
! * This file generated by SAVEQMGR V6.0.2 on 2006-09-01 at 06.01.00 hours.
--- 2 ----
! * This file generated by SAVEQMGR V6.0.2 on 2006-09-02 at 06.01.00 hours.
*************** ALTER QMGR +
*** 25 ****
! MAXUMSGS(20000) +
--- 25 ----
! MAXUMSGS(10000) +
*************** DEFINE QLOCAL ('PETER.REPLY') +
*** 75 ****
! TRIGTYPE(FIRST) +
--- 75 ----
! TRIGTYPE(EVERY) +
*************** DEFINE QLOCAL ('PETER.REPLY') +
*** 88,130 ****
- QDPLOEV(DISABLED) +
- QSVCINT(999999999) +
- QSVCIEV(NONE) +
- DISTL(NO) +
- NPMCLASS(NORMAL) +
- CLUSTER(' ') +
- CLUSNL(' ') +
- DEFBIND(NOTFIXED) +
- REPLACE
-
- DEFINE QLOCAL ('PETER.REQ') +
- * CRDATE (2004-10-12) +
- * CRTIME (15.44.41) +
- * ALTDATE (2005-09-12) +
- * ALTTIME (13.57.53) +
- DESCR(' ') +
- PUT(ENABLED) +
- DEFPRTY(0) +
- DEFPSIST(NO) +
- * CURDEPTH(0) +
- SCOPE(QMGR) +
- GET(ENABLED) +
- MAXDEPTH(30000) +
- MAXMSGL(4194304) +
- SHARE +
- DEFSOPT(SHARED) +
- MSGDLVSQ(PRIORITY) +
- HARDENBO +
- USAGE(NORMAL) +
- NOTRIGGER +
- TRIGTYPE(FIRST) +
- TRIGDPTH(1) +
- TRIGMPRI(0) +
- TRIGDATA(' ') +
- PROCESS(' ') +
- INITQ(' ') +
- RETINTVL(999999999) +
- BOTHRESH(0) +
- BOQNAME(' ') +
- QDEPTHHI(80) +
- QDEPTHLO(20) +
- QDPMAXEV(ENABLED) +
- QDPHIEV(DISABLED) +
--- 87 ---- |
_________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Sep 02, 2006 2:20 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Well, first off... use the -1 or -2 options.
That'll make the COMP/diff output simpler. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wschutz |
Posted: Sat Sep 02, 2006 3:00 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Quote: |
Unfortunatly, that still flags the 2nd line in the MS03, since that line different between Day 1 and Day 2 as it shows the date. |
try: -F, it will also supress altdate/time and curdepth changes....
if you use a "diff sensitive editor" (like vi(m)), the changes are evident _________________ -wayne |
|
Back to top |
|
 |
Michael Dag |
Posted: Sat Sep 02, 2006 10:30 pm Post subject: Re: Compare two MS03 output files |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
PeterPotkay wrote: |
Before reinventing the wheel here |
This is exactly what MQDocument does and more...
just send me 2 MS03 output files and I will produce some demo output _________________ Michael
MQSystems Facebook page |
|
Back to top |
|
 |
jefflowrey |
Posted: Sun Sep 03, 2006 4:54 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I was poking around at M071 a couple of weeks ago, and it looked like it could do this for you as well. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Sun Sep 03, 2006 9:11 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
Several years ago I started a project to track individual MQ Object changes using a cvs repository.
Basically, I took the long format of MS03 and broke the file into individual files - 1 for each object. Each file has the object name and the file extension would be the object type. i.e. q, p, chl, nl and qmgr.
i.e. For queue 'SYSTEM.DEFAULT.LOCAL.QUEUE', the script would create a file called 'SYSTEM.DEFAULT.LOCAL.QUEUE.q' with the MS03 long format. This file would be checked into the cvs.
Hence, I let cvs server take care of any differences and it provided a nice history trail.
I wanted to write a cvs client that was specific to MQ but I never got around to it.
The concept still works even without a MQ specific cvs client software.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
dutchman |
Posted: Mon Sep 04, 2006 4:12 am Post subject: |
|
|
Acolyte
Joined: 15 May 2001 Posts: 71 Location: Netherlands
|
Pity that the queue manager attribute
CONFIGEV Whether configuration events are generated. This parameter is valid only on z/OS.
is not available.
Anyone interested in raising this as a 'enhancement request' via the MQ user group?
Cheers ... R |
|
Back to top |
|
 |
Michael Dag |
Posted: Tue Sep 05, 2006 9:04 am Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
dutchman wrote: |
Pity that the queue manager attribute
CONFIGEV Whether configuration events are generated. This parameter is valid only on z/OS.
is not available.
|
yeah... SOX should be enough to justify this one...  _________________ Michael
MQSystems Facebook page |
|
Back to top |
|
 |
markt |
Posted: Wed Sep 06, 2006 9:27 am Post subject: |
|
|
 Knight
Joined: 14 May 2002 Posts: 508
|
How useful would a mechanism be that tracks PCF commands issued to the Distributed qmgrs - using the same format as the z/OS Command Events.
It's not feasible to non-invasively add runmqsc tracking, and be a complete solution, but the command server CAN be monitored (and IS today, on my machine). So commands from the MQ Explorer or MO71 would be logged. |
|
Back to top |
|
 |
Michael Dag |
Posted: Wed Sep 06, 2006 10:08 am Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
markt wrote: |
How useful would a mechanism be that tracks PCF commands issued to the Distributed qmgrs - using the same format as the z/OS Command Events.
It's not feasible to non-invasively add runmqsc tracking, and be a complete solution, but the command server CAN be monitored (and IS today, on my machine). So commands from the MQ Explorer or MO71 would be logged. |
any mechanism would be welcome!
however not being able to track runmqsc commands (which does NOT require the command server and therefore is used in many organisations!) is a real 'pain' nowadays... (auditors referring to SOX etc...)! _________________ Michael
MQSystems Facebook page |
|
Back to top |
|
 |
|