       identification division.
       program-id. Deel-4-Opgave-12b.
       author. Keppens Toon.
       date-written. 19-december-2001.

       environment division.
        configuration section.
         source-computer. PC.
         object-computer. PC.
       input-output section.
        file-control.
           select cdbestand
               assign to
               "E:\TI 2A\Back-end Programmeren\Oefeningen\Hoofdstuk 4\Oe
      -        "fening_1_Lijst_cdbestand.dat"
               organization sequential
               access sequential
               file status cd-status.

       data division.
        file section.
          FD cdbestand.
          01 C-cdrecord.
               03 C-titel pic x(20).
               03 C-uitvoerder pic x(20).
               03 C-genre pic x(15).
               03 C-prijs pic 9(4).

       working-storage section.
           01 cd-status pic xx.
               88 EOF-cd value "10".
           01 I-c-cdrecord.
               03 I-c-titel pic x(20).
               03 I-c-uitvoerder pic x(20).
               03 I-c-genre pic x(15).
               03 I-c-prijs pic 9(4).
           01 scherm-1.
               03 lijn-dubbel pic x(35)
                   value ":::::::::::::::::::::::::::::::::::".
               03 lijn-dubbelpunt pic x(1) value ":".
               03 lijn-info-bottom pic x(12) value "Keppens Toon".
               03 lijn-info-midden-1 pic x(63)
                   value "------------------- Uitlezen van records -----
      -            "----------------".
               03 lijn-info-top pic x(60)
                   value "Hogeschool Gent  --   Departement BEST".
           01 datum pic 99/99/99.
           01 verder pic x.
               88 verdergoed values "J", "j", "N", "n".
               88 verderstop values "n", "N".

       procedure division.
           main.
               copy "Oefening_1_Lijst_b_layout.dat".

               perform m-o-kopregels
               perform body with test before until EOF-cd
               perform m-o-eindregels

               stop run
           .

           m-o-kopregels.
               open input cdbestand
               read cdbestand at end continue
               end-read
           .

           body.
              perform v-c-cdrec-m-o-rec with test before until EOF-cd
           .

           m-o-eindregels.
              close cdbestand
           .

           v-c-cdrec-m-o-rec.
               move C-titel to I-c-titel
               move C-uitvoerder to I-c-uitvoerder
               move C-genre to I-c-genre
               move C-prijs to I-c-prijs
               display I-c-titel at 1108
               display I-c-uitvoerder at 1130
               display I-c-genre 1155
               display I-c-prijs at 1165
               read cdbestand at end continue
               end-read
               accept verder at 1648
           .
