LocalEnvironment ツリーの Destination へのデータの取り込み

Destination サブツリーを使用して、出力ノード、HTTPRequest ノード、および RouteToLabel ノードによって使用されるターゲットの宛先をセットアップすることができます。 以下の例は、ESQL プロシージャーを作成およびそれを使用して、それぞれの使用における値のセットアップというタスクを実行する方法を示しています。

これらのプロシージャーをコピーし、示されているとおりに使用することもできますし、あるいはそれらを変更または拡張して同様のタスクを実行することもできます。

MQOutput ノードでのキュー名の追加。
CREATE PROCEDURE addToMQDestinationList(IN LocalEnvironment REFERENCE, IN newQueue char) BEGIN
  /*******************************************************************************
  * A procedure that will add a queue name to the MQ destination list
  * in the local environment.
  * This list is used by a MQOuput node which has its mode set to Destination list.
  *
  * IN LocalEnvironment: LocalEnvironment to be modified. 
  * Set this to OutputLocalEnvironment when calling this procedure
  * IN queue:    queue to be added to the list
  *
  *******************************************************************************/
  if LocalEnvironment.Destination.MQDestinationList.DestinationData is null then
     set LocalEnvironment.Destination.MQDestinationList.DestinationData.queueName =newQueue;
  else
     create LASTCHILD OF LocalEnvironment.Destination.MQDestinationList.DestinationData NAME 'queueName' VALUE newQueue; 
  end if;
END;
HTTPRequest ノードでの URL の追加。
CREATE PROCEDURE addToHTTPRequestList(IN LocalEnvironment REFERENCE, IN newUrl char) BEGIN
  /*******************************************************************************
  * A procedure that will add a URL to the HTTP request list in the local environment.
  * This list is used by a HTTPRequest node which has its mode set to Destination list.
  *
  * IN LocalEnvironment: LocalEnvironment to be modified. 
  * Set this to OutputLocalEnvironment when calling this procedure
  * IN queue:    URL to be added to the list
  *
  *******************************************************************************/
  set LocalEnvironment.Destination.HTTP.RequestURL  = newUrl;
END;
RouteToLabel ノードでのラベルの追加。
CREATE PROCEDURE addToRouteToLabelList(IN LocalEnvironment REFERENCE, IN newLabel char) BEGIN
  /*******************************************************************************
  * A procedure that will add a label name to the RouteToLabel list
  * in the local environment.
  * This list is used by a RoteToLabel node.
  *
  * IN LocalEnvironment: LocalEnvironment to be modified. 
  * Set this to OutputLocalEnvironment when calling this procedure
  * IN label:    label to be added to the list
  *
  *******************************************************************************/
	if LocalEnvironment.Destination.RouterList.DestinationData is null then
     set LocalEnvironment.Destination.RouterList.DestinationData."label" = newLabel;
  else
     create LASTCHILD OF LocalEnvironment.Destination.RouterList.DestinationData NAME 'label' VALUE newLabel; 
  end if;
END;
関連概念
メッセージ・フローの概要
LocalEnvironment ツリー
関連資料
Compute ノード
DestinationData サブツリー内のエレメントのデータ・タイプ
CREATE PROCEDURE ステートメント
SET ステートメント
特記事項 | 商標 | ダウンロード | ライブラリー | サポート | フィードバック
Copyright IBM Corporation 1999, 2005 Last updated: 11/07/2005
ac16862_