Message selection for dmpmqmsg
Message selection for the dmpmqmsg command can be based on message age or message content.
Using message age
You can choose to process only messages older than a certain time interval using the
-T flag.
Time interval can be specified in Days, Hours and Minutes. The general format being
[days:]hours:]minutes.
The parameter can take one or two times, -T [OlderThanTime][,YoungerThanTime].
For example:
- Display messages older than five minutes
dmpmqmsg -m QM1 -i Q1 -fstdout -T5 - Display messages younger than five minutes
dmpmqmsg -m QM1 -i Q1 -fstdout -T,5 - Display messages older than one day but younger than two days.
dmpmqmsg -m QM1 -i Q1 -fstdout -T1440,2880 - The following command copies messages older than one hour from Q1 to Q2.
dmpmqmsg -m QM1 -i Q1 -o Q2 -T1:0 - The following command moves messages older than one week from Q1 to Q2
dmpmqmsg -m QM1 -I Q1 -o Q2 -T7:0:0
Using message content
You can specify a maximum of three of each search string. If multiple strings are used, they are
treated as follows:
- Positive search strings
- When multiple positive strings are used, then all the strings must be present for the search to
match. For example, the command
only returns messages that contain both strings.dmpmqmsg -iMATCH -s LIVERPOOL -s CHELSEA - Negative search strings
- When multiple negative strings are used, then none of the strings must be present for the search
to match. For example, the command
only returns messages that contain neither string.dmpmqmsg -IMATCH -S HOME -S DRAW