*---------*---------------*-----------------*----------------*---------------* | CODE | FACTOR 1 | FACTOR 2 | RESULT | INDICATORS | | | | | FIELD | | *---------*---------------*-----------------*----------------*---------------* | ANDXX | Comparand | Comparand | | | *---------*---------------*-----------------*----------------*---------------*
If you specify this optional operation, it must immediately follow a ANDxx, DOUxx, DOWxx, IFxx, ORxx, or WHxx operation. With ANDxx, you can specify a complex condition for the DOUxx, DOWxx, IFxx, and WHxx operations. The ANDxx operation has higher precedence than the ORxx operation.
The control level entry (positions 7 and 8) can be blank or can contain an L1 through L9 indicator, an LR indicator, or an L0 entry to group the statement within the appropriate section of the program. The control level entry must be the same as the control level entry for the associated DOUxx, DOWxx, IFxx, or WHxx operation. Conditioning indicator entries (positions 9 through 17) are not permitted.
Factor 1 and factor 2 must contain a literal, a named constant, a figurative constant, a table name, an array element, a data structure name, or a field name. Factor 1 and factor 2 must be either both character data or both numeric data. The comparison of factor 1 and factor 2 follows the same rules as those given for the compare operations. See Compare Operations.
*...1....+....2....+....3....+....4....+....5....+....6....+....7... CL0N01N02N03Factor1+++OpcdeFactor2+++ResultLenDHHiLoEqComments++++++ C* C* If ACODE is equal to A and indicator 50 is on, the MOVE C* and WRITE operations are processed. C ACODE IFEQ 'A' C *IN50 ANDEQ*ON C MOVE 'A' ACREC C WRITERCRSN C* If the previous conditions were not met but ACODE is equal C* to A, indicator 50 is off, and ACREC is equal to D, the C* following MOVE operation is processed. C ELSE C ACODE IFEQ 'A' C *IN50 ANDEQ*OFF C ACREC ANDEQ'D' C MOVE 'A' ACREC C ENDIF C ENDIF
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.