MOVE 1 TO CUR-POSITION
MOVE 2 TO CUR-POSITION-MAX
MOVE SPACE TO END-STATUS
*
PERFORM UNTIL END-STATUS = "P9"
OR CUR-POSITON > CUR-POSITION-MAX
EVALUATE CUR-POSITION
WHEN 0
WHEN 1
ACCEPT ACEP-A-ACP
EVALUATE END-STATUS
WHEN "09"
SUBTRACT 1 FROM CUR-POSITION
WHEN OTHER
DISPLAY ACEP-A-DSP
ADD 1 TO CUR-POSITON
END-EVALUATE
WHEN 2
ACCEPT ACEP-B-ACP
EVALUATE END-STATUS
WHEN "09"
SUBTRACT 1 FROM CUR-POSITION
WHEN OTHER
DISPLAY ACEP-B-DSP
ADD 1 TO CUR-POSITON
END-EVALUATE
WHEN OTHER
CONTINUE
END-EVALUATE
END-PERFORM.