home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / techs.zip / TECH18.ARC / GETMEMO.PRG next >
Text File  |  1985-11-02  |  1KB  |  44 lines

  1. * PROCEDURE Getmemo.PRG
  2. * Date....: November 1, 1985
  3. * Version.: dBASE III, The Developer's Release
  4. * Note(s).: Procedure to get a block of memo fields.
  5. *           Called by Memorpt.PRG.
  6. *
  7. PARAMETERS width, next, yourfile, memofield
  8. PRIVATE ALL
  9. * ---Version 1.0 and 1.1 users,
  10. * ---delete the following line of code.
  11. SET MEMOWIDTH TO &width
  12. *
  13. SET CONSOLE OFF
  14. SET ALTERNATE TO Temp
  15. SET ALTERNATE ON
  16. next = 0
  17. * ---Write the next set of memo fields to the current block.
  18. DO WHILE next < 5 .AND. ( .NOT. EOF() )
  19.    ? STR( RECNO(), 4 ), " ", &memofield
  20.    SKIP
  21.    next = next + 1
  22. ENDDO
  23. CLOSE ALTERNATE
  24. SET CONSOLE ON
  25. * ---Append the block of memo fields into database file.
  26. SELECT Memotemp
  27. ZAP
  28. APPEND FROM Temp SDF
  29. ERASE Temp.TXT
  30. * ---Version 1.0 and 1.1 users,
  31. * ---delete the following line of code.
  32. SET MEMOWIDTH TO 50
  33. *
  34. * ---Go to the first non-blank record in Memotemp.
  35. GO TOP
  36. DO WHILE LEN( TRIM( Recnum ) ) = 0
  37.    SKIP
  38. ENDDO
  39. * ---Get the last record whose memo field is in this block.
  40. SELECT &yourfile
  41. lastrec = RECNO()
  42. SKIP  - next
  43. RETURN
  44. * EOP Getmemo.PRG