       identification division.
       program-id.Oef20a.
       author. Marlies De Ridder.
       date-written. 28-december-2004.

       environment division.
       select Spreuken
       assign to  "spreuken.dat"
       organization is sequential
       access sequential
       .
       configuration section.
       source-computer.pc.
       object-computer.pc.
       file section.
       FD spreuken.
           01 S-record.
               03 S-nr pic 99.
               03 S-tekst pic x(50).

       WORKING-STORAGE SECTION.
       01 datum.
           03 jaar pic 99.
           03 maand pic 99.
           03 dag pic 99.
       01 ndatum.
           03 ndag pic 99/.
           03 nmaand pic 99/.
           03 njaar pic 99.
       01 keuze pic x.
               88 goede-keuze values "1" thru "3".
           01 naam pic x(18) values "Marlies De Ridder".
       77 antwoord pic x.
           88 stoppen value "n","N".


       screen section.
       01 G-MENU.
         02 LINE 1 COL 1 VALUE "HOGESCHOOL GENT".
         02 LINE 2 COL 25 VALUE "³  SPREUKENBESTAND MAKEN  ³".
         02 LINE 9 COL 1 VALUE "Nummer:".
         02 LINE 10 COL 1 VALUE "Tekst:".
         02 line 12 col 1 value"Nog een record maken? (J/N)".

       PROCEDURE DIVISION.
       main.
           perform kopregels
           perform spreukenschrijven
           exit program.
       kopregels.
           display spaces upon crt
           display G-MENU
           accept datum from date
           move dag to ndag
           move maand to nmaand
           move jaar to njaar
           display ndatum at 0169
           display naam at 2501
           display "OEFENING 20a" at 2565
       .
       spreukenschrijven.
           Open extend spreuken
           move "j" to antwoord
           perform until antwoord="n" or "N"

           accept S-nr at 0940 with required
           accept S-tekst at 1040
           write s-record
           end-write
           move "x" to s-record
           accept antwoord at 1230
           end-perform
           close spreuken

       .
