MQSeries::Message::IIH - Class to send/receive IMS Bridge Header (IIH) messages


MQSeries documentation  | view source Contained in the MQSeries distribution.

Index


NAME

Top

MQSeries::Message::IIH -- Class to send/receive IMS Bridge Header (IIH) messages

SYNOPSIS

Top

  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 $qmgr_obj = MQSeries::QueueManager->new(QueueManager => 'TEST.QM');
  my $queue = MQSeries::Queue->
    new(QueueManager => $qmgr_obj,
        Queue        => 'IMS.DATA.QUEUE',
        Mode         => 'input');
  my $msg = MQSeries::Message::IIH->new();
  $queue->Get(Message => $msg);
  my $data = $msg->Data(); # Array-reference

DESCRIPTION

Top

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. For requests, each chunk has a transaction name and a body; for replies, each chunk is free form.

METHODS

Top

PutConvert

This method is not called by the user's application, but used internally by MQSeries::Queue::Put() and MQSeries::QueueManager::Put1().

PutConvert() encodes the data supplied by the programmer into a series of chunks as required by IMS.

The data can come in two forms:

GetConvert

This method is not called by the user's application, but used internally by MQSeries::Queue::Get().

GetConvert() decodes IMS data into a series of chunks, returned as an array-reference containing strings.

_setEndianess

Top

An IMS message contains a number of numerical fields that are encoded based on the endian-ness of the queue manager. In most cases, that is the same endian-ness as the client (certainly if both run on the same machine), and this module uses that as the default.

If you need to override the guess made by this module, then you can invoke the _setEndianess method with 0 if server is little-endian (Linux/Intel, Windows NT) and 1 if server is big-endian (Solaris/SPARC).

For example, if you run on a Linux/Intel machine, but need to create a message for a queue manager running on Solaris:

  MQSeries::Message::IIH->_setEndianess(1);
  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   ',
                  },
        );

AUTHORS

Top

Hildo Biersma, Jeff Dunn, Javier Ripoll Villagómez

SEE ALSO

Top

MQSeries(3), MQSeries::QueueManager(3), MQSeries::Queue(3), MQSeries::Message(3)


MQSeries documentation  | view source Contained in the MQSeries distribution.