ENTER-STATE-CODE.                               enter-the-data.
    PERFORM ACCEPT-STATE-CODE.                      PERFORM accept-the-data.
    PERFORM RE-ACCEPT-STATE-CODE                    PERFORM re-accept-the-data.
      UNTIL STATE-CODE NOT = SPACE.                   UNTIL the-data is valid.
ACCEPT-STATE-CODE.                              accept-the-data.
    DISPLAY " ".                                    DISPLAY a-prompt
    DISPLAY "ENTER STATE CODE OF THE STATE" .
    DISPLAY "TO " THE-MODE
              "(2 UPPER CASE CHARACTERS)".
    DISPLAY "ENTER ZZ TO STOP ENTRY".
    ACCEPT STATE-CODE.                              ACCEPT the data
RE-ACCEPT-STATE-CODE.                           re-accept the data
    DISPLAY "STATE CODE MUST BE ENTERED".           DISPLAY error-message
    PERFORM ACCEPT-STATE-CODE.                      PERFORM accept-the-data

Back