テーブル名が LOOKUP 以外の命令で使用された場合にはいつでも、テーブル名は 、実際には正常に行われた最後の検索によって取り出されたデータを参照する ことになります。 したがって、テーブル名をこの方法で指定する場合には、テー ブルからの要素を演算命令で使用することができます。
LOOKUP 命令で演算項目 1 としてテーブル名を使用する場合には、現行要素が 検索引数として使用されます。 この方法では、テーブルからの要素それ自体を検索引数とすることができます。
テーブルは、LOOKUP 命令以外の命令で結果のフィールドとして使用することもで きます。 この場合には、現行要素の値は演算仕様書によって変更されます。 この方法では、テーブルの内容を演算命令によって変更することができます (図 79 を参照)。
*...1....+....2....+....3....+....4....+....5....+....6....+....7... CL0N01Factor1+++++++Opcode(E)+Factor2+++++++Result++++++++Len++D+HiLoEq.. C ARGMNT LOOKUP TABLEA 20 C* If element is found multiply by 1.5 C* If the contents of the entire table before the MULT operation C* were 1323.5, -7.8, and 113.4 and the value of ARGMNT is -7.8, C* then the second element is the current element. C* After the MULT operation, the entire table now has the C* following value: 1323.5, -11.7, and 113.4. C* Note that only the second element has changed since that was C* the current element, set by the LOOKUP. C IF *IN20 C TABLEA MULT 1.5 TABLEA C ENDIF
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.