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 » General IBM MQ Support » Compare two MS03 output files

Post new topic  Reply to topic Goto page 1, 2, 3  Next
 Compare two MS03 output files « View previous topic :: View next topic » 
Author Message
PeterPotkay
PostPosted: Sat Sep 02, 2006 7:42 am    Post subject: Compare two MS03 output files Reply with quote

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
View user's profile Send private message
RogerLacroix
PostPosted: Sat Sep 02, 2006 8:16 am    Post subject: Re: Compare two MS03 output files Reply with quote

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
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Sat Sep 02, 2006 8:47 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
PeterPotkay
PostPosted: Sat Sep 02, 2006 10:19 am    Post subject: Reply with quote

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
View user's profile Send private message
wschutz
PostPosted: Sat Sep 02, 2006 10:38 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Hows:
diff -c -F DEFINE ms03.yesterday ms03.today
?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
PeterPotkay
PostPosted: Sat Sep 02, 2006 2:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Sat Sep 02, 2006 2:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
wschutz
PostPosted: Sat Sep 02, 2006 3:00 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
Michael Dag
PostPosted: Sat Sep 02, 2006 10:30 pm    Post subject: Re: Compare two MS03 output files Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
jefflowrey
PostPosted: Sun Sep 03, 2006 4:54 am    Post subject: Reply with quote

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
View user's profile Send private message
RogerLacroix
PostPosted: Sun Sep 03, 2006 9:11 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
dutchman
PostPosted: Mon Sep 04, 2006 4:12 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Michael Dag
PostPosted: Tue Sep 05, 2006 9:04 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
markt
PostPosted: Wed Sep 06, 2006 9:27 am    Post subject: Reply with quote

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
View user's profile Send private message
Michael Dag
PostPosted: Wed Sep 06, 2006 10:08 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2, 3  Next Page 1 of 3

MQSeries.net Forum Index » General IBM MQ Support » Compare two MS03 output files
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.