Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 000100 IDENTIFICATION DIVISION.
- 000200 PROGRAM-ID. Oef6.
- ENVIRONMENT DIVISION.
- INPUT-OUTPUT section.
- file-control.
- Select invoer assign to "oef4_klant"
- Organization is sequential.
- Select uitvoer assign to "oef4_klant_indexed"
- Organization is indexed
- Access mode is random
- record key is klantid-uit.
- DATA DIVISION.
- file section.
- FD invoer.
- 01 klant.
- 03 klantid pic x(12).
- 03 klantnaam pic x(25).
- 03 bestbedrag pic 9(6)v9(2).
- 03 korting pic 9(2).
- 03 gembedrag pic 9(6)v9(2).
- 03 overbodig pic 9(12).
- 03 aanduiding pic x(3).
- 88 belgisch value 'BEL'.
- 88 europees value 'EUR'.
- 88 nteuropees value 'INT'.
- FD uitvoer.
- 01 klant-uit.
- 03 klantid-uit pic x(12).
- 03 klantnaam-uit pic x(25).
- 03 bestbedrag-uit pic 9(6)v9(2).
- 03 korting-uit pic 9(2).
- 03 gembedrag-uit pic 9(6)v9(2).
- 03 overbodig-uit pic 9(12).
- 03 aanduiding-uit pic x(3).
- 88 belgisch-uit value 'BEL'.
- 88 europees-uit value 'EUR'.
- 88 nteuropees-uit value 'INT'.
- working-storage section.
- 01 einde pic x value '0'.
- 88 einde-bestand value '1'.
- 01 pauze pic x.
- PROCEDURE DIVISION.
- pgm.
- open input invoer
- open output uitvoer
- Read invoer at end move 1 to einde
- end-read
- perform until einde-bestand
- move klant to klant-uit
- write klant-uit
- invalid key display 'ongeldige sleutel'
- klant-uit
- not invalid key display klant-uit
- end-write
- read invoer at end move 1 to einde
- end-read
- accept pauze
- end-perform
- close invoer uitvoer
- * perform pgm2
- stop run.
- pgm2.
- open input uitvoer
- display 'start pgm2'
- move 0 to einde
- Read uitvoer next
- at end move 1 to einde
- end-read
- perform until einde-bestand
- display klant-uit
- Read uitvoer next
- at end move 1 to einde
- end-read
- end-perform
- close uitvoer
- accept einde
Add Comment
Please, Sign In to add comment