home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / dspdbfek.zip / DISPDBF.PRG
Text File  |  1987-04-03  |  3KB  |  99 lines

  1. *****************************************************************
  2. *           DispDbf - display DBF pertinent information         *
  3. *****************************************************************
  4. *                                                               *
  5. *           Copyright (c) 1987 by Eric Kestler                  *
  6. *****************************************************************
  7. *           Permission granted to freely distribute/modify      *
  8. *           provided this copyright notice retained.            *
  9. *                                                               *
  10. *           This program is distributed as FreeWare,            *
  11. *           NO remuneration is sought.  Use at your             *
  12. *           own risk.  This has been developed using            *
  13. *           dBASE III Plus from Ashton-Tate, UI by WallSoft,    *
  14. *           and CLIPPER/Autumn '86 release, by Nantucket.       *
  15. *           All rights reserved.                                *
  16. *****************************************************************
  17. *                                                               *
  18. *           Syntax:  DISPDBF  dbf-file without extension        *
  19. *                                    or                         *
  20. *                    DISPDBF  (no parms, you will be prompted)  *
  21. *****************************************************************
  22. *           Link Parms:                                         *
  23. *             PLINK86 Fi DISPDBF,EXTENDC VERB                   *
  24. *****************************************************************
  25. ***
  26. *** Dispdbf : pop-up help box
  27. *** Generated April 3, 1987
  28. ***
  29. PARAMETERS dbf
  30. external LUPDATE,RECSIZE
  31. * Environment
  32. set talk off
  33. set scoreboard off
  34. set stat off
  35. save screen to snapit
  36. copyrite='Copyright (c) 1987 by Eric Kestler'
  37. * pop the box
  38. SET COLOR TO +GR/BR
  39. @ 06,58 TO 19,77 DOUBLE
  40. SET COLOR TO +GR/GR
  41. @ 07,59 CLEAR TO 18,76
  42. @ 07,61 SAY "DBF"
  43. @ 09,59 SAY "Records"
  44. @ 11,59 SAY "RecSize"
  45. @ 13,59 SAY "# Fields"
  46. @ 15,59 SAY "FileSize"
  47. @ 17,59 SAY "Updated"
  48.  
  49. if pcount()=0
  50.         dbf=space(8)
  51.         @ 7,67 get DBF pict "!!!!!!!!"
  52.         read
  53. else
  54.         dbf=upper(dbf)
  55. endif
  56. use &DBF
  57. hd=header()             &&header size
  58. rcnt=reccount()         &&# records
  59. rsz=recsize()           &&rec len
  60. fcnt=fcount()
  61. fsz=hd+(rcnt*rsz)+1     &&guess size of file
  62. rcnt=ltrim(str(rcnt,8))
  63. fcnt=ltrim(str(fcnt,3))
  64. rsz=ltrim(str(rsz,4))
  65. fsz=ltrim(str(fsz,8))
  66. lup=dtoc(lupdate())
  67. set color to +b/w
  68. @ 07,67 SAY DBF PICTURE "!!!!!!!!"
  69. @ 09,67 SAY RCNT PICTURE "XXXXXXXX"
  70. @ 11,67 SAY RSZ PICTURE "XXXX"
  71. @ 13,67 SAY FCNT PICTURE "XXX"
  72. @ 15,67 SAY FSZ PICTURE "XXXXXXXX"
  73. @ 17,67 SAY LUP PICTURE "99/99/99"
  74.  
  75.  
  76. * wait for keystroke
  77. key=inkey()
  78. do while key=0
  79.   key=inkey()
  80. enddo
  81. * restore the screen
  82. SET COLOR TO +W/B
  83. @ 06,58 SAY "                    "
  84. @ 07,58 SAY "                    "
  85. @ 08,58 SAY "                    "
  86. @ 09,58 SAY "                    "
  87. @ 10,58 SAY "                    "
  88. @ 11,58 SAY "                    "
  89. @ 12,58 SAY "                    "
  90. @ 13,58 SAY "                    "
  91. @ 14,58 SAY "                    "
  92. @ 15,58 SAY "                    "
  93. @ 16,58 SAY "                    "
  94. @ 17,58 SAY "                    "
  95. @ 18,58 SAY "                    "
  96. @ 19,58 SAY "                    "
  97. restore screen from snapit
  98. RETURN
  99.