IDENTIFICATION DIVISION.
PROGRAM-ID. SCREEN-EXAMPLE.
AUTHOR. Kevin Roper.
INSTALLATION. KEYHOLE HQ.
DATE-WRITTEN. 05/15/20.

DATA DIVISION.
WORKING-STORAGE SECTION.
01 RESPONSE    PIC X VALUE IS "C".
01 THING-ID    PIC X(10).
01 THING-NAME  PIC X(10).

SCREEN SECTION.
01 DATA-ENTRY-SCREEN.
  05 VALUE "DATA ENTRY SCREEN" BLANK SCREEN    LINE 1 COL 35.
  05 VALUE "ID#"                               LINE 3 COL 10.
  05 ID-INPUT                                  LINE 3 COL 25
       PIC X(10) TO THING-ID.
  05 VALUE "NAME"                              LINE 5 COL 10.
  05 NAME-INPUT                                LINE 5 COL 25
       PIC X(10) TO THING-NAME.
  05 VALUE "C - TO CONTINUE"                   LINE 7 COL 1.
  05 VALUE "Q - TO QUIT"                       LINE 8 COL 1.
  05 VALUE "ENTER RESPONSE"                    LINE 9 COL 1.
  05 RESPONSE-INPUT                            LINE 9 COL 16
       PIC X TO RESPONSE.

PROCEDURE DIVISION.
MOVE "C" TO RESPONSE.
PERFORM RESET-INPUT-SCREEN.
DISPLAY DATA-ENTRY-SCREEN.
ACCEPT DATA-ENTRY-SCREEN.
PERFORM INPUT-SCREEN-LOOP UNTIL RESPONSE="Q".
STOP RUN.

INPUT-SCREEN-LOOP.
PERFORM RESET-INPUT-SCREEN.
DISPLAY DATA-ENTRY-SCREEN.
ACCEPT DATA-ENTRY-SCREEN.

RESET-INPUT-SCREEN.
MOVE "0000" TO THING-ID.
MOVE "ENTER NAME" TO THING-NAME.


