自由形式構文 | (許可されていない - DOW 命令コードを使用) |
コード | 演算項目 1 | 演算項目 2 | 結果フィールド | 標識 | ||
---|---|---|---|---|---|---|
DOWxx | 被比較値 | 被比較値 |
DOWxx 命令コードは、指定された条件が存在する時に処理したい命令のグルー プの前に置かれます。 より複雑な条件を指定するためには、DOWxx ステートメント の直後に ANDxx また は ORxx ステートメントを続けます。 対応する ENDDO ステートメントが このグループの終わりを示します。DO グループの詳細と xx の意味については、構造化プログラミング命令を参照してください。
演算項目 1 と演算項目 2 には、リテラル、名前のついた定数、形象定数、 フィールド名、テーブル名、配列要素、またはデータ構造名を入れなければな りません。 演算項目 1 と演算項目 2 は同じデータ・タイプでなければなりません。 演算項目 1 と 2 の比較は、 比較命令の場合と同じ規則に従って行われます。 比較命令を参照してください。
DOWxx 命令自体のほかに、DO グループは、DOWxx ステートメントおよび ENDDO ステートメントの条件付け標識によっても制御されます。 DOWxx ステートメントの条件付け標識は、DOWxx 命令を開始するかどうかを 制御します。 対応する ENDDO ステートメントの条件付け標識は、DOW グループ をもう一度繰り返すかどうかを制御します。
DOWxx 命令は次のステップに従って実行されます。
これらの命令が DOWxx 命令にどのような影響を与えるかについて は、LEAVE (Do/For グループからの抜け出し)および ITER (繰り返し)を参照してください。
詳細については、比較命令または 構造化プログラミング命令を参照してください。
*...1....+....2....+....3....+....4....+....5....+....6....+....7...+.... CL0N01Factor1+++++++Opcode(E)+Factor2+++++++Result++++++++Len++D+HiLoEq.... * * The DOWLT operation allows the operation within the DO group * to be processed only if FLDA is less than FLDB. If FLDA is * not less than FLDB, the program branches to the operation * immediately following the ENDDO operation. If FLDA is less * than FLDB, the operation within the DO group is processed. C C FLDA DOWLT FLDB C * * The ENDDO operation causes the program to branch to the first * DOWLT operation where a test is made to determine whether FLDA * is less than FLDB. This loop continues processing until FLDA * is equal to or greater than FLDB; then the program branches * to the operation immediately following the ENDDO operation. C C MULT 2.08 FLDA C ENDDO C * In this example, multiple conditions are tested. The combined * DOWLT ORLT operation allows the operation within the DO group * to be processed only while FLDA is less than FLDB or FLDC. If * neither specified condition exists, the program branches to * the operation immediately following the ENDDO operation. If * either of the specified conditions exists, the operation after * the ORLT operation is processed. C C FLDA DOWLT FLDB C FLDA ORLT FLDC C * The ENDDO operation causes the program to branch to the second * DOWLT operation where a test determines whether specified * conditions exist. This loop continues until FLDA is equal to * or greater than FLDB and FLDC; then the program branches to the * operation immediately following the ENDDO operation. C C MULT 2.08 FLDA C ENDDO
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.