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

ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT DEMOFILE ASSIGN TO './data3.data'
ORGANIZATION IS LINE SEQUENTIAL.

DATA DIVISION.
FILE SECTION.
FD DEMOFILE.
01 PERSON-RECORD.
  05 NUM PIC X(2).
  05 NAME PIC A(10).

WORKING-STORAGE SECTION.
01 PERSON.
  05 NUM PIC X(2).
  05 NAME PIC A(10).

01 DEMO-EOF PIC A(1) VALUE IS 'N'.

01 PEOPLE-TABLE.
  04 PEOPLE-ROW OCCURS 10 TIMES.
    10 PEOPLE-ROWVAL PIC X(10) VALUE '-'.
    10 DBTABLE-COL OCCURS 10 TIMES.
      15 DBTABLE-COLVAL PIC 9(3) VALUE 100.

  
PROCEDURE DIVISION.
OPEN INPUT DEMOFILE.
 PERFORM UNTIL DEMO-EOF='Y'
  READ DEMOFILE INTO PERSON
  AT END MOVE 'Y' TO DEMO-EOF
  NOT AT END DISPLAY "PERSON: " NAME IN PERSON 
  END-READ
  END-PERFORM.
CLOSE DEMOFILE.
STOP RUN.
