home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol285 / list1.prg < prev    next >
Encoding:
Text File  |  1986-12-22  |  2.3 KB  |  74 lines

  1. **    Last revision: April 17, 1986 at 18:54
  2. * list1.ag
  3. * this module makes a list of all updated information in the file
  4. * get a starting  point
  5. STOR DTOC(DATE()) TO stdat
  6. @ 18,12 SAY 'Files after what date are to be printed'
  7. @ 18,57 GET stdat PICTURE '99/99/99'
  8. READ
  9. STOR SUBSTR(stdat,7,2)+SUBSTR(stdat,1,2)+SUBSTR(stdat,4,2) TO stdate
  10. GO TOP
  11. * initialize variables
  12. STOR 0 TO pageno
  13. STOR .t. TO more2
  14. SET MARGIN TO 10
  15. DO WHIL more2
  16. * do page counter etc
  17.  STOR pageno + 1 TO pageno
  18.  STOR 6 TO lineno
  19.  CLEAR
  20. * eject a page and skip down 1 line
  21. IF printer = 'Y'
  22.  SET PRINT ON
  23.  EJEC
  24. ENDIF
  25.  ? '  '
  26. * and write TITLE
  27.  ? '==================== LIST UPDATES AFTER - ' + stdat+ ' ============='
  28.  ? ' '
  29.  ? '         ' + DTOC(date()) + '                                            PAGE: '+ STR(pageno,3)
  30.  ? ' '
  31. * now fill up rest of page to 55 lines with names etc
  32.  DO WHIL lineno < 55
  33. * now do a page if not end of file
  34.   IF .NOT. EOF()
  35.    STOR SUBSTR(update,7,2)+SUBSTR(update,1,2)+SUBSTR(update,4,2) TO stdate1
  36.    IF stdate1 >= stdate
  37.     ? '-------------------------------------------------------------------'
  38.     ? '     ' +  "Name: "+ TRIM(mr)+' ' + TRIM(fname) +' ' + lastname
  39.     ? '     ' + "Spouse: " + spouse + "Address as: " + dear
  40.     ? '     ' + "Title: " + title
  41.     ? '     ' + "Company: " + company1
  42.     ? '     ' + "       : " + company2
  43.     ? '     ' + "Address: " + TRIM(caddress) + "  " + suite
  44.     ? '     ' + "         " + TRIM(ccity) +'  ' + cst + '  ' +czip
  45.     ? '     ' + "Home address: " + TRIM(address) + "  " + apt
  46.     ? '     ' + "              " + TRIM(city) +'  '+  st + '  ' +zip
  47.     ? '     ' + 'Phones - office: ' + ophone + ' home: ' + phone
  48.     ? '     ' + "List:  " + cs1 + "    Code: " + cs2 
  49.     ? '     ' + "Send to office: " + send
  50.     ? '     ' + "Date update: " + update
  51. * if it is end of file quit
  52. * bump line counter and get next record
  53.     STOR lineno +13 TO lineno
  54.     SKIP
  55.    ELSE
  56.     SKIP
  57.    ENDI date
  58.   ELSE
  59.    STOR .f. TO more2
  60.    STOR 60 TO lineno
  61.   ENDI not EOF
  62.  ENDD while lineno < 55
  63. ENDD more2
  64. * if it was on turn it off
  65. IF printer = 'Y'
  66. EJEC
  67. ENDIF
  68. SET PRINT OFF
  69. * next line for the benefit of Clipper
  70. SET MARGIN TO 0
  71. RETURN
  72.  
  73.  
  74.