home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 31 / CDASC_31_1996_juillet_aout.iso / vrac_os2 / ftree10e.zip / ANNDEATH.FTX < prev    next >
Text File  |  1996-05-02  |  1KB  |  64 lines

  1. /*
  2.    Family Tree Rexx Script FTX
  3.    Copyright (C) 1996 by <Nils Meier>
  4.    Please send comments to meier2@athene.informatik.uni-bonn.de
  5.    <When you start this script you'll get a list of anniversaries
  6.     of death.>
  7. */
  8.  
  9. /* Params */
  10.  
  11. namewidth=32
  12.  
  13. /* Display Header */
  14. SAY("Anniversary of Death (next anniversary) "||DATE())
  15. SAY(................................................)
  16.  
  17. datewidth=14
  18. namewidth=datewidth+30
  19.  
  20. /* Sort Mankind by Death Month and Day */
  21. rc=SORT('DM,DD')
  22.  
  23. /* Calculate actual year */
  24. thisyear=WORD(DATE(),3)
  25.  
  26. /* Display persons in tree */
  27.  
  28. rc=FIRST()
  29. DO UNTIL rc=0
  30.  
  31.    /* Get Deathdate */
  32.    month=getDeathDate('m')
  33.  
  34.    /* Check for date o.k. */
  35.    IF LENGTH(month)>0 THEN DO
  36.       result=month||' '||getDeathDate('D')
  37.  
  38.       /* Fit to static length */
  39.       IF LENGTH(result)<datewidth THEN
  40.          result=result||COPIES(' ',datewidth-LENGTH(result))
  41.       ELSE
  42.          result=LEFT(result,datewidth)
  43.  
  44.       /* Add name and fit to static length */
  45.       result=result||getName()||','||getFirstName()
  46.       IF LENGTH(result)<namewidth THEN
  47.          result=result||COPIES(' ',namewidth-LENGTH(result))
  48.       ELSE
  49.          result=LEFT(result,namewidth)
  50.  
  51.       /* Add anniversary */
  52.       result=result||' ('||thisyear-getDeathDate('Y')||')'
  53.  
  54.       /* O.K. output */
  55.       SAY(result)
  56.    END
  57.  
  58.    /* Next one */
  59.    rc=NEXT()
  60. END
  61.  
  62. /* Done */
  63. RETURN
  64.