Here are a couple of examples of EVERY.
In the first DECIDE, the value A is present in several VALUE clauses, so we need to test EVERY value.
In the second DECIDE, we test the contents of a vector, which contains 4 values. Again, we must test EVERY value.
DEFINE DATA LOCAL
1 #S (A1) INIT <'A'>
1 #V (A1/4) INIT <'A', 'C', 'D'>
END-DEFINE
DECIDE ON EVERY #S
VALUE 'A'
WRITE 'S is A'
VALUE 'A', 'B'
WRITE 'S is A or B'
VALUE 'A', 'C'
WRITE 'S is A or C'
ANY
WRITE '=' #S
NONE
WRITE 'S not found' #S
END-DECIDE
SKIP 1
*
DECIDE ON EVERY #V (*)
VALUE 'A'
WRITE 'V contains A'
VALUE 'B'
WRITE 'V contains B'
VALUE 'C'
WRITE 'V contains C'
ANY
WRITE '=' #V (*)
NONE
WRITE 'V not found' #V (*)
END-DECIDE
END
Page 1 02/21/11 21:35:11
S is A
S is A or B
S is A or C
#S: A
V contains A
V contains C
#V: A C D