**********
* PCSYSD *
**********
* Met dit programma voeren we de datum van vandaag in. Dit programma
* maakt gebruik van het programma PCSYTD om de datum te testen op
* bestaanbaarheid.
*
@  7,21 SAY "U KUNT NU DE DATUM VAN VANDAAG INVOEREN."
@  8,21 SAY "DOE DIT IN HET FORMAAT 'DD/MM/JJ'."
@ 10,21 SAY "NIEUWE SYSTEEMDATUM"
STORE sysdate TO date:back
STORE F TO finished
DO WHILE .NOT. finished
   STORE "." TO akk
   DO WHILE .NOT. (akk $ 'JN')
      @ 10,41 GET sysdate PICTURE "##/##/##"
      @ 20,68 SAY "AKKOORD :.:"
      @ 22,58 SAY "HUIDIGE DATUM"
      @ 22,72 SAY date:back
      READ
      CLEAR GETS
      STORE "." TO akk
      STORE T TO date:okay
      IF sysdate = "00/00/00"
         STORE date:back TO sysdate
         @ 10,42 SAY sysdate
      ELSE
         STORE sysdate TO datum
         STORE T TO date:must
         DO pcsytd
      ENDIF
      IF date:okay
         DO WHILE .NOT. (akk $ "JN")
            STORE "." TO akk
            @ 20,76 GET akk PICTURE "!"
            READ
            CLEAR GETS
         ENDDO
         IF akk = "N"
            STORE "." TO again
            DO WHILE .NOT. (again $ "JN")
               @ 20,59 SAY "OPNIEUW INTIKKEN " GET again PICTURE "!"
               READ
               CLEAR GETS
            ENDDO
            IF again = "J"
               STORE "." TO akk
               @ 20,59 SAY "                    "
               STORE date:back TO sysdate
            ELSE
               STORE T TO finished
               STORE date:back TO sysdate
            ENDIF   
         ELSE
            STORE T TO finished
         ENDIF
      ELSE
         STORE datum TO sysdate
      ENDIF
   ENDDO 
ENDDO finished
*
* Zet de dBASE II systeemdatum, die wordt gebruikt bij het updaten van een
* bestand. 
*
STORE $(sysdate,4,2) + "/" + $(sysdate,1,2) + "/" + $(sysdate,7,2) TO memvar
SET DATE TO &memvar 
RELEASE memvar,date:back,datum,date:must,date:okay,dag,maand,jaar
RELEASE finished,again,akk
SAVE TO &memory
RETURN
*
* EINDE PROGRAMMA
*
