Multiple choice technology mainframe

IDENT-ID IDENT-NAME IDENT-AGE 1234 AAAA 12 2345 BBBB 23 3456 CCCC 14 6879 DDDD 17 7625 EEEE 21 READ IDENTIFICATION-TABLE BY SUPER-ID-NAME-AGE REJECT IF IDENT-AGE NE '21' AND IDENT-AGE NE '14' END-READ What will be the output of above program?

  1. Record 1 & 5

  2. Record 3 & 5

  3. No output

  4. Record 1, 2, & 4

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

READ with REJECT excludes records matching the condition. The condition 'IDENT-AGE NE '21' AND IDENT-AGE NE '14'' means 'age is neither 21 nor 14'. The REJECT statement excludes such records, keeping only records WHERE age IS 21 OR 14. Record 3 has age 14, record 5 has age 21. Records 1, 2, 4 (ages 12, 23, 17) are rejected. Output is records 3 & 5.