ASPLMQ User Guide v 1.00
© 2026 Bassem W. Jamaleddine
Channel names typically describe the data flow direction between environments. For example, queue manager A defines a channel named FROMSOURCE.TODESTINATION, while queue manager B defines a matching channel named TODESTINATION.FROMSOURCE. Alternatively, queue manager A defines a channel named FOO1.TO.FOO2, while the corresponding channel FOO2.TO.FOO1 resides on queue manager B. Regardless of the middleware engineer's naming intent, ASPL performs group operations on these channels. Within ASPL, regular expressions match element names in a group using equality filters coded in the ShallowMatches.pm shallow module. These processes are known as shallow group operations.
This chapter explains how to use shallow group operations to compare IBM MQ channels.
■ Shallow group operation on channels with mqcha2elem
Consider the following example comparing channel names across two queue managers: ACMENYNY and ACMEVAVA. The figure below illustrates two set variables, nyAcme and vaAcme, which contain the captured channels from queue manager ACMENYNY (hosted on NYNYQM) and queue manager ACMEVAVA (hosted on VAVAQM), respectively. The figure also displays the group union operation, fU, nyAcme vaAcme, executed between the two set variables.
This section is not included in the SAMPLE PREVIEW.
■ Shallow group operation on channels with mqcha3elem
Regular expressions play a central role in group operations by matching elements and their attributes. In particular, the ASPL capability to perform shallow group operations enables direct comparison of attributes that utilize concordant naming conventions. The following example demonstrates this functionality.
Add channel FOO1.TO.FOO2 to queue manager ACMENYNY, and channel FOO2.TO.FOO1 to queue manager ACMEVAVA.
(nynymq's qmgr:ACMENYNY) 03:50 mqm@nynymq: ~ # echo "DEFINE CHANNEL(FOO1.TO.FOO2) CHLTYPE(SDR) XMITQ(MSAX5) CONNAME('vmsmqa.acme.tcnd.com(1414)') REPLACE" | runmqsc ACMENYNY
5724-H72 (C) Copyright IBM Corp. 1994, 2009. ALL RIGHTS RESERVED.
Starting MQSC for queue manager ACMENYNY.
1 : DEFINE CHANNEL(FOO1.TO.FOO2) CHLTYPE(SDR) XMITQ(MSAX5) CONNAME('vmsmqa.acme.tcnd.com(1414)') REPLACE
AMQ8014: WebSphere MQ channel created.
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.
This section is not included in the SAMPLE PREVIEW.
#####################################################
# "matching IBM MQ channel from.TO.destination (for either)"
sub mqcha3elem {
my ($mat,$mat2) = @_;
$mat =~ s/^\///; $mat2 =~ s/^\///;
my @mat = split(/\//,$mat);
my @mat2 = split(/\//,$mat2);
my $elm1 = pop @mat;
my $elm2 = pop @mat2;
if ($elm2 =~ /(\w+)\.TO\.(\w+)/i) {
my ($from,$to) = ($1,$2);
$elm2 = $to . ".TO." . $from;
#$elm2 = $to . "." . $from;
}
if ($elm1 =~ /$elm2/i) {
return 1;
}
elsif ($elm2 =~ /$elm1/i) {
return 1;
}
return 0;
}