NAME
MQSeries::Message::IIH -- Class to send/receive IMS Bridge Header (IIH) messages
SYNOPSIS
use MQSeries::Message::IIH;
#
# Create a message to be put on a queue going to IMS
#
my $message = MQSeries::Message::IIH->
new(Header => { Authenticator => 'foobar',
CommitMode => MQSeries::MQICM_COMMIT_THEN_SEND,
TranState => MQSeries::MQITS_IN_CONVERSATION,
},
Data => { Transaction => 'ISIC7000',
Body => ' Blah Blah Blah ',
},
);
#
# Get a message from an IMS queue
#
my $queue = MQSeries::Queue->
new(QueueManager => 'TEST.QM',
Queue => 'IMS.DATA.QUEUE',
Mode => 'input');
my $msg = MQSeries::Message::IIH->new();
$queue->Get(Message => $msg);
my $data = $msg->Data();
print "Have transaction '", $data->{Transaction},
"' and body '", $data->{Body}, "'\n";
DESCRIPTION
This is a simple subclass of MQSeries::Message which supports sending and retrieving IMS Bridge Header (IIH) messages. This class is experimental, as it was based on the documentation and a few sample messages; feedback as to how well it works is welcome.
An IMS Bridge Header message contains an IIH header, followed by one more data chunks with IMS transaction data. Each chunk has a transaction name and a body.
METHODS
PutConvert, GetConvert
Neither of these methods are called by the users application, but are used internally by MQSeries::Queue::Put() and MQSeries::Queue::Get(), as well as MQSeries::QueueManager::Put1().
PutConvert() encodes the data supplied by the programmer into a series of chunks as required by IMS.
GetConvert() decodes IMS data into a series of chunks, each which a transaction name and body.
For both PutConvert() and GetConvert() (message creation or message data extraction), the data can come in two forms:
A hash-reference with a
Transaction
andBody
, as shown in the example above. This is the common case.A reference to an array with hash-references, each in the same format as before. I am not sure whether anyone would actually use this...
SEE ALSO
MQSeries(3), MQSeries::QueueManager(3), MQSeries::Queue(3), MQSeries::Message(3)