PerlでMQを操ってみる


まずはSupportPacsのMA89を覗いてみる
ここから最新のアーカイブを取得し適当なディレクトリに解凍。

あとは簡単。解凍したディレクトリにcdして

perl Makefile.PL
make
make test
make install

ちなみに自分はVC++でnmake使いました。なんか色々ワーニング出たけどとりあえずOKっぽいので放置。単純なGET/PUTもやってみましたがそのレベルでは問題ないようです。今後、時間があったらいろいろな機能を試してみるつもり。


あとUtility Classなんて粋な物も実装されているようで

A number of utility classes have been created for parsing the various
file formats used by the MQSeries product:

  • MQSeries::Config::ChannelTable
  • MQSeries::Config::Machine
  • MQSeries::Config::QMgr
  • MQSeries::ErrorLog::Parser
  • MQSeries::ErrorLog::Tail
  • MQSeries::ErrorLog::Entry
  • MQSeries::FDC::Parser
  • MQSeries::FDC::Tail
  • MQSeries::FDC::Entry


あたりもなんか面白い使い道があるかも。


ちなみに普通に使うにあたりuse MQSeries;だけだとクライアント接続、use MQServer::MQSeriesとするとサーバ接続になるようです。