 REM *
 REM * birthday.sbp - (c)1994 Thorsten Gau - freely distributable
 REM *
 REM * This is a little demo to use with SBase4pro and Recall V3.x
 REM * It demonstates how to extract some birhdays from a database.
 REM * After saving the output to a file you may import it to ReCall.
 REM *
 REM * You need to change the names according to your database !!!
 REM *
 REM * To contact me EMail to: root@gauhh.hanse.de
 REM *


 CLS 

 del$ = CHR$ (34) + "," + CHR$ (34)
 FILE "adr"

 REQUEST "Save to a file ?","",130,rc%
 IF rc% = 1 THEN 
    filename$ = "ram:"
    REQUEST "Save As...","",18,rc%,filename$
    IF rc% = 1 THEN 
       write% = 1
       OPEN filename$ FOR OUTPUT 
    END IF 
 END IF 

 SELECT WHERE Geburtstag > "01.01.1900"

 SELECT FIRST 
 WHILE NOT EOF ("adr")
   d$ = STR$ ( DAY (Geburtstag))
   m$ = STR$ ( MONTH (Geburtstag))
   y$ = STR$ ( YEAR (Geburtstag) - 1900)
   dd$ = d$ + "." + m$ + "."

   ? CHR$ (34) + "* "; TRIM$ (VName);" "; TRIM$ (NName);del$;
   ? dd$ + "0";del$;
   ? "-1:-1";del$;

   IF y%% > 93 THEN 
      ? TRIM$ (VName);" hat am ";dd$;" Geburtstag.";
   ELSE 
      ? TRIM$ (VName);" wird {" + d$ + m$ + y$ + "}! Und zwar am ";dd$;
   END IF 

   ? CHR$ (34)
   SELECT NEXT 
 WEND 
  
 IF write% = 1 THEN CLOSE OUTPUT 
