home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 31 / CDASC_31_1996_juillet_aout.iso / vrac_os2 / ftree10e.zip / ABC-LIST.FTX next >
Text File  |  1996-05-02  |  1KB  |  49 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.    <This script displays an ordered list of the last names of
  6.    all persons in the actual family tree. Feel free to take this
  7.    as a template for new scripts !>
  8. */
  9.  
  10. /* Params */
  11. namewidth=30
  12.  
  13. /* Display Header */
  14. SAY("Alphabetical List.  Today's date :"||DATE())
  15. SAY(.............................................)
  16.  
  17. /* Sort Mankind by Name,FirstName */
  18. rc=SORT("N,F")
  19.  
  20. /* Display persons in tree */
  21. rc=FIRST()
  22.  
  23. DO UNTIL RC=0
  24.  
  25.    /* Get Name + FirstName and fit to static length */
  26.    result=getName()
  27.    firstname=getFirstName()
  28.    IF LENGTH(firstname)>0 THEN result=result||','||firstname
  29.    IF LENGTH(result)<namewidth THEN
  30.       result=result||COPIES(' ',namewidth-LENGTH(result))
  31.    ELSE
  32.       result=LEFT(result,namewidth)
  33.  
  34.    /* Get Dates */
  35.    birth=getBirthDate()
  36.    IF length(birth)>0 THEN result=result||'*'||birth||' '
  37.    death=getDeathDate()
  38.    IF length(death)>0 THEN result=result||'+'||death
  39.  
  40.    /* O.K. output */
  41.    SAY(result)
  42.  
  43.    /* Next one */
  44.    rc=NEXT()
  45. END
  46.  
  47. /* Done */
  48.  
  49. RETURN