プログラム制御コマンドタブと多数のDestination画面

LANSA RAMP-TS

プログラム制御コマンドタブと多数のDestination画面


コマンドタブに表示する画面を制御するプログラムを作成できます。少し設定が難しいですが、拡張は簡単です。

Reportsビジネスオブジェクトを作成します。

Reportsに"Submit Report Request"という1つのインスタンス・レベルのコマンドハンドラーを設定します。このコマンドをデフォルトにします。

Reportsビジネスオブジェクトで、非表示のフィルターを作成し、インスタンスリストに5つのリポート名を入れます。関連するリポートを識別するためのAKeyN値またはNKeyN値を必ず追加してください。例:

BEGIN_COM ROLE(*EXTENDS #VF_AC007) HEIGHT(182) WIDTH(326)

Mthroutine uInitialize Options(*Redefine)

#Com_Owner.avHiddenFilter := TRUE

#avListManager.ClearList

Invoke #avListManager.AddtoList Visualid1('Report 1') Visualid2('Daily production report') AKey1('uReport1') NKey1(1)

Invoke #avListManager.AddtoList Visualid1('Report 2') Visualid2('Monthly production report') AKey1('uReport2') NKey1(2)

Invoke #avListManager.AddtoList Visualid1('Report 3') Visualid2('Overloaded production report') AKey1('uReport3') NKey1(3)

Invoke #avListManager.AddtoList Visualid1('Report 4') Visualid2('Monday Morning Management Report') AKey1('uReport4') NKey1(4)

Invoke #avListManager.AddtoList Visualid1('Report 5') Visualid2('Daily production report') AKey1('uReport5') NKey1(5)

* Instance list updating has been completed

INVOKE METHOD(#avListManager.EndListUpdate)

Endroutine

End_Com    

インスタンスリストとコマンドハンドラータブは、次のようにユーザーに表示されます。

ユーザーがインスタンスリストのいずれかのリポートをクリックすると、関連する5250 Destination画面がタブに表示されます。

通常の方法で5つの5250 Destinationフォームを定義します。 

1番目の5250 Destinationフォーム(例:uReport1)だけを"Submit Report Request"コマンド・ハンドラー・タブに関連付けます。

インスタンス・リストの数値キー値NKey1に要求したリポート番号が含まれている場合は、uReport1に移動するスクリプトを次のように変更できます。

/* See is the report number in the instance list is for some other report */

/* If it is then "reroute" this request to correct 5250 destination form  */

switch ( objListManager.NKey1[0] )

{

  case 2:NAVIGATE_TO_SCREEN("uReport2"); return;

  case 3:NAVIGATE_TO_SCREEN("uReport3"); return;

  case 4:NAVIGATE_TO_SCREEN("uReport4"); return;

  case 5:NAVIGATE_TO_SCREEN("uReport5"); return;

}

/* Normal navigation logic to handle report number 1 */

NAVIGATE_TO_JUNCTION("whatever");

Etc, etc ……………………

インスタンス・リストの英数字キー値AKey1に要求した5250 Destination画面の名前が含まれている場合は、スクリプトを次のように変更できます。

/* See is the 5250 screen name is this screen's name                     */

/* If it is then "reroute" this request to correct 5250 destination form */

if (objListManager.AKey1[0] != "uReport1")

{

   NAVIGATE_TO_SCREEN(objListManager.AKey1[0]);

   return;

}

/* Normal navigation logic to handle this screen */

NAVIGATE_TO_JUNCTION("whatever");

Etc, etc ……………………