**********
* PCREDL *
**********
STORE "                    " TO periode
@ 7,15 SAY "TIK DE TEKST VOOR DE PERIODE " GET PERIODE
READ
@ 7,0
@ 7,20 SAY "HET DEADLINE SUMMARY WORDT NU AFGEDRUKT."
@ 8,0 
* Dit programma drukt het deadline overzicht af.
STORE "--------------------" TO ln 
STORE 66 TO maxline
SET EXACT OFF
USE &opdracht INDEX &opdracht
GO BOTTOM
STORE # TO recno
GO TOP
IF .NOT. EOF
   DO WHILE *
      SKIP +1
   ENDDO
   STORE prod:line TO m:prod
   SET FORMAT TO PRINT
   SET EXACT ON
   STORE 0 TO pag
   STORE 1 TO line
   DO WHILE .NOT. EOF
      IF recno > 0 .AND. .NOT. *
         IF prod:line # m:prod
            STORE prod:line TO m:prod
            STORE 1 TO line
            @ maxline + 1,125 SAY "-> " + STR(pag+1,2)
         ENDIF
         SELECT SECONDARY
         STORE 0 TO m:oplage
         STORE p.prod:nr TO memvar
         USE &oplage INDEX &oplage
         FIND &memvar
         DO WHILE (memvar = s.prod:nr) .AND. .NOT. EOF 
            STORE m:oplage + aant:best TO m:oplage
            SKIP +1
         ENDDO
         USE
         USE &planning INDEX &planning
         FIND &memvar
         SELECT PRIMARY
         IF line = 1
         * print kopregel
            STORE pag + 1 TO pag
            @ 3,11 SAY 'DEADLINE SUMMARY'
            @ 3,30 SAY 'PAG: ' + STR(pag,2)
            @ 3,40 SAY 'PERIODE: ' + periode
            @ 4,11 SAY '================'
            @ 7,11 SAY 'PROD.NR.  MAILDATUM  PRODUKT  ONDERDEEL                          OPLAGE'
            @ 8,21 SAY 'MARK.  DPP    PRIM   CREAT  BULK   BESTEL FPP    ONTW.  SCHN.  WERK-  ZET-   PROEF  FILMS  ADRES- NABE-  AFWER-'
            @ 9,21 SAY 'BRIEF.               MEET.  SCRN.  BONNEN         T/S    T/S   TEK.   WERK                 DRAGER WERK.  KING'
            @ 10,11 SAY ln + ln + ln + ln + ln + ln + "-"
            STORE 11 TO line
         ENDIF
         * print 2 regels
         @ line,11 SAY $(prod:nr,1,2) + '/' + $(prod:nr,3,5)
         @ line,21 SAY mail:dat 
         @ line,34 SAY produkt
         @ line,41 SAY onderdeel
         @ line,73 SAY STR(m:oplage,9) 
         STORE line + 1 TO line 
         @ line,21 SAY $(s.mark:brf,1,5)
         @ line,28 SAY $(s.dpp,1,5)
         @ line,35 SAY $(s.prim,1,5)
         @ line,42 SAY $(s.creat:mt,1,5)
         @ line,49 SAY $(s.bulk:scr,1,5)
         @ line,56 SAY $(s.best:bon,1,5)
         @ line,63 SAY $(s.fpp,1,5)
         @ line,70 SAY $(s.ontw:ts,1,5)
         @ line,77 SAY $(s.schn:ts,1,5)
         @ line,84 SAY $(s.werktek,1,5)
         @ line,91 SAY $(s.zetwerk,1,5)
         @ line,98 SAY $(s.proef,1,5)
         @ line,105 SAY $(s.films,1,5)
         @ line,112 SAY $(s.adr:drag,1,5)
         @ line,119 SAY $(s.nabewerk,1,5)
         @ line,126 SAY $(s.afwerk,1,5)
         STORE line + 1 TO line
         @ line,11 SAY ln + ln + ln + ln + ln + ln + "-"
         STORE line + 1 TO line
         IF line > maxline .AND. (# <> recno)
            @ line + 1,125 SAY "-> " + STR(pag+1,2)
            STORE 1 TO line
         ENDIF
      ENDIF
      SKIP +1
   ENDDO
   @ maxline + 2,0 SAY " "
   SET FORMAT TO SCREEN
ENDIF
USE
SELECT SECONDARY 
USE
SELECT PRIMARY
RETURN
*
* EINDE PROGRAMMA
*