Author |
Message
|
Kupava |
Posted: Wed Aug 24, 2005 6:40 am Post subject: saveqmgr options |
|
|
 Novice
Joined: 21 Apr 2005 Posts: 10 Location: NJ
|
Hello,
I am hoping to find out if there a way to run saveqmgr command and pick up only the latest changes to the MQ objects(channels/queues), based on ALTDATE/ALTTIME fields of the given objects.
Any feedback is appriciated.
Thanks
Irina. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Aug 24, 2005 6:42 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Not that I know of.
Of course, it does come with the source code. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wschutz |
Posted: Wed Aug 24, 2005 6:48 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
So, you'd want to filter objects based on altdate/time Ie, only generate mqsc if the alttime is after a specified value)..... _________________ -wayne |
|
Back to top |
|
 |
Kupava |
Posted: Wed Aug 24, 2005 6:48 am Post subject: |
|
|
 Novice
Joined: 21 Apr 2005 Posts: 10 Location: NJ
|
Jeff, I know, thats what I am looking at right now. I was hoping for an easier way out  |
|
Back to top |
|
 |
Kupava |
Posted: Wed Aug 24, 2005 6:50 am Post subject: |
|
|
 Novice
Joined: 21 Apr 2005 Posts: 10 Location: NJ
|
wschutz
yes that would be correct. |
|
Back to top |
|
 |
wschutz |
Posted: Wed Aug 24, 2005 7:00 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
(without opening Pandora's box...) I'm wondering if this is part of a larger requirement to filter saveqmgr's output. Right now, the only "filter" you can apply is to supress SYSTEM* definitions (via -s). I can see merit in this requirement, but how complicated would the filter need be?
Comments gladly accepted .... (but no promises.... ) _________________ -wayne |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Aug 24, 2005 7:10 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It might be simplest if you could add an option to force each object definition to a single line.
Then one can "saveqmgr -1 |grep -v SYSTEM" or etc (assuming the option is -1).
I realize that might have implications for piping back into runmqsc...
Otherwise, filter by name, altdate/alttime, and type (qlocal, etc) would be a good start. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Kupava |
Posted: Wed Aug 24, 2005 8:35 am Post subject: |
|
|
 Novice
Joined: 21 Apr 2005 Posts: 10 Location: NJ
|
Decided to suppress the SYSTEM* defenitions and then wrote a Shell script to parse through everything else in the output file.
Thanks a lot guys for very helpful hints.
Irina |
|
Back to top |
|
 |
wschutz |
Posted: Thu Aug 25, 2005 2:50 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Quote: |
It might be simplest if you could add an option to force each object definition to a single line. |
I've considered that for a while now, aside from the fear of blowing the input buffer on runmqsc, there doesn't appear to be a way to place ALTDATE/TIME on the line, since mqsc syntax doesn't allow for imbedded comments. Without ALTDATE/TIME, the original poster's request wouldn't be satisified. _________________ -wayne |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 25, 2005 3:29 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
wschutz wrote: |
Quote: |
It might be simplest if you could add an option to force each object definition to a single line. |
I've considered that for a while now, aside from the fear of blowing the input buffer on runmqsc, there doesn't appear to be a way to place ALTDATE/TIME on the line, since mqsc syntax doesn't allow for imbedded comments. Without ALTDATE/TIME, the original poster's request wouldn't be satisified. |
You could always reorder fields so that all comments came at the end of the one line...  _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
maxis |
Posted: Thu Aug 25, 2005 3:56 am Post subject: |
|
|
Centurion
Joined: 25 Jun 2002 Posts: 144
|
is there any such command called saveqmgr or is it a custom code ? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 25, 2005 3:59 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
pvmk wrote: |
is there any such command called saveqmgr or is it a custom code ? |
It's a support pack, MS03.
It's very handy. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
maxis |
Posted: Thu Aug 25, 2005 5:01 am Post subject: |
|
|
Centurion
Joined: 25 Jun 2002 Posts: 144
|
Thanks Jeff for that quick reply ...  |
|
Back to top |
|
 |
hopsala |
Posted: Thu Aug 25, 2005 5:18 am Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
wschutz wrote: |
there doesn't appear to be a way to place ALTDATE/TIME on the line, since mqsc syntax doesn't allow for imbedded comments. Without ALTDATE/TIME, the original poster's request wouldn't be satisified. |
Alors, a slightly odd but valid suggestion - what about putting ALTDATE in the DESCR field? I don't think most people use it anyway, and you could concat it to the end to preserve their text.
I think the benefits here outweigh the shortcomings, especially since this is the only way; simply put a big warning to those using this option that DESCR may be changed and let them run their own risks. In my personal experience, the need for grepping saveqmgr output is far more common than the use of DESCR field.
(btw, I think it is much wiser moving in the one-output-line direction than filtering through parameters such as -s) |
|
Back to top |
|
 |
wschutz |
Posted: Thu Aug 25, 2005 5:46 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Quote: |
You could always reorder fields so that all comments came at the end of the one line... |
Jeff..perhaps I don't understand, but
Code: |
def ql(test) *comment |
isn't valid mqsc syntax
Quote: |
Alors, a slightly odd but valid suggestion - what about putting ALTDATE in the DESCR field? I don't think most people use it anyway, and you could concat it to the end to preserve their text.
|
Perhaps, or what about the idea of allowing oneline AND filtering via parms for the "special cases" ie altdate and crdate/time? _________________ -wayne |
|
Back to top |
|
 |
|