*
MOVE 1 TO FOCUS-POSITION.
MOVE 2 TO FOCUS-POSITION-MAX.
MOVE SPACE TO END-STATUS.
MOVE SPACE TO WINDOW-STATUS.
*
PERFORM UNTIL END-STATUS = "P9"
OR WINDOW-STATUS = "EXIT"
*
EVALUATE FOCUS-POSITION
WHEN 1
ACCEPT ACEP-A-ACP
EVALUATE END-STATUS
WHEN "09"
SUBTRACT 1 FROM FOCUS-POSITION
WHEN "01"
DISPLAY ACEP-A-DSP
PERFORM ACEP-A-CHECK-SUB
IF ERR-FLAG = 1
THEN
DISPLAY ERROR-MSG-A
ELSE
ADD 1 TO FOCUS-POSITON
END-IF
WHEN OTHER
CONTINUE
END-EVALUATE
WHEN 2
ACCEPT ACEP-B-ACP
EVALUATE END-STATUS
WHEN "09"
SUBTRACT 1 FROM FOCUS-POSITION
WHEN "01"
DISPLAY ACEP-B-DSP
PERFORM ACEP-B-CHECK-SUB
IF ERR-FLAG = 1
THEN
DISPLAY ERROR-MSG-B
ELSE
ADD 1 TO FOCUS-POSITON
END-IF
WHEN OTHER
CONTINUE
END-EVALUATE
WHEN OTHER
CONTINUE
END-EVALUATE
*
IF FOCUS-POSITION = 0
THEN MOVE 1 TO FOCUS-POSITION
END-IF
*
IF FOCUS-POSITION > FOCUS-POSITION-MAX
THEN MOVE "EXIT" TO WINDOW-STATUS
END-IF
*
END-PERFORM.