JavaCompute ノードを使用した MQRFH2 ヘッダーへのアクセス

JavaCompute ノードで MQRFH2 ヘッダーを構成する場合、2 種類のフィールドが存在します。

以下のコードは、サブスクリプション要求の作成で使用される出力メッセージに MQRFH2 ヘッダーを追加します。
public void addRfh2(MbMessage msg) throws MbException
{
MbElement root = msg.getRootElement();
MbElement body = root.getLastChild();
// insert new header before the message body
MbElement rfh2 = body.createElementBefore("MQHRF2");
rfh2.createElementAsFirstChild(MbElement.TYPE_NAME_VALUE, "Version", new Integer(2));
rfh2.createElementAsFirstChild(MbElement.TYPE_NAME_VALUE, "Format", "MQSTR");
rfh2.createElementAsFirstChild(MbElement.TYPE_NAME_VALUE, "NameValueCCSID", new Integer(1208));
MbElement psc = rfh2.createElementAsFirstChild(MbElement.TYPE_NAME, "psc", null);
psc.createElementAsFirstChild(MbElement.TYPE_NAME, "Command", "RegSub");
psc.createElementAsFirstChild(MbElement.TYPE_NAME, "Topic", "department");
psc.createElementAsFirstChild(MbElement.TYPE_NAME, "QMgrName", "QM1");
psc.createElementAsFirstChild(MbElement.TYPE_NAME, "QName", "PUBOUT");
psc.createElementAsFirstChild(MbElement.TYPE_NAME, "RegOpt", "PersAsPub");
}
関連概念
メッセージ・フローの概要
メッセージのモデル化
関連タスク
メッセージ・フローの設計
メッセージ・フローの内容の定義
関連資料
MQRFH2 ヘッダー
特記事項 | 商標 | ダウンロード | ライブラリー | サポート | フィードバック
Copyright IBM Corporation 1999, 2006 Last updated: 5 01, 2006
ac30440_