演算を条件付けするために標識がオフでなければならない場合には、9 桁目に N を 入れてください。グループ化された AND/OR 行の標識の他に制御レベル標識 (7 から 8 桁目 に指定される場合) も、図 1 のとおりに演算を実行する前に、 すべてがこの図に示されるとおりに正確に指定されていなければなりません。
*...1....+....2....+....3....+....4....+....5....+....6....+....7...
CL0N01Factor1+++++++Opcode(E)+Factor2+++++++Result++++++++Len++D+HiLoEq..
*
C 25
CAN L1 SUB TOTAL TOTAL A
CL2 10
CANNL3TOTAL MULT 05 SLSTAX B
*
標識 25 がレコード・タイプを表し、レコード・タイプ 25 が読み取られた 時に制御レベル 2 の切れ目が起こったとします。 L1 と L2 は両方ともオンになっ ています。7 から 8 桁目の制御レベル標識によって条件付けされたすべての演算 は、9 から 11 桁目の制御レベル標識によって条件付けされた演算より前に実行されます。 したがって、 A の演算の前に B の演算が行われます。 A の演算は、25 によって示される新しい制御グループの最初のレコードに ついて実行されますが、 B の演算は、前の制御グループのすべてのレコ ードに対して実行される合計演算です。
他の条件が満たされて L2 がオンの時に B の演算を実行することが できます。標識 10 はオンでなければならず、L3 標識がオンであってはなりません。
L2 と NL3 の両方によって条件付けされた演算は、制御レベル 2 の切れ目が起 こった時にだけ実行されます。 制御レベル 3 が起こった場合には、L2 もオンにな りますが、その時点ではこの演算は実行したくないため、これら 2 つの標識が同 時に使用されています。
図 2 から 図 3 までは 、条件付け標識の例を示しています。
*...1....+....2....+....3....+....4....+....5....+....6....+....7...
IFilenameSqNORiPos1NCCPos2NCCPos3NCC.PFromTo++DField+L1M1FrPlMnZr...*
I........................Fmt+SPFrom+To+++DcField+++++++++L1M1FrPlMnZr....
*
* Field indicators can be used to condition operations. Assume the
* program is to find weekly earnings including overtime. The over-
* time field is checked to determine if overtime was entered.
* If the employee has worked overtime, the field is positive and -
* indicator 10 is set on. In all cases the weekly regular wage
* is calculated. However, overtime pay is added only if
* indicator 10 is on.
*
ITIME AB 01
I 1 7 EMPLNO
I 8 10 0OVERTM 10
I 15 20 2RATE
I 21 25 2RATEOT
CL0N01Factor1+++++++Opcode(E)+Extended-factor2+++++++++++++++++++++++++++
*
* Field indicator 10 was assigned on the input specifications.
* It is used here to condition calculation operations.
*
C EVAL (H) PAY = RATE * 40
C 10 EVAL (H) PAY = PAY + (OVERTM * RATEOT)
*...1....+....2....+....3....+....4....+....5....+....6....+....7...
IFilename++SqNORiPos1+NCCPos2+NCCPos3+NCC................................
I........................Fmt+SPFrom+To+++DcField+++++++++L1M1FrPlMnZr....
*
* A record identifying indicator is used to condition an operation.
* When a record is read with a T in position 1, the 01 indicator is
* set on. If this indicator is on, the field named SAVE is added
* to SUM. When a record without T in position 1 is read, the 02
* indicator is set on. The subtract operation, conditioned by 02,
* then performed instead of the add operation.
*
IFILE AA 01 1 CT
I OR 02 1NCT
I 10 15 2SAVE
CL0N01Factor1+++++++Opcode(E)+Factor2+++++++Result++++++++Len++D+HiLoEq..
*
* Record identifying indicators 01 and 02 are assigned on the input
* specifications. They are used here to condition calculation
*
*
CL0N01Factor1+++++++Opcode(E)+Factor2+++++++Result++++++++Len++D+HiLoEq..
C 01 ADD SAVE SUM 8 2
C 02 SUB SAVE SUM 8 2