home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / dbstpo21.zip / DBSTRUPO.DOC < prev   
Text File  |  1986-08-16  |  8KB  |  222 lines

  1.                          DBSTRUPO.COM v 2.1
  2.       Display dBASE II and III structure of all DBF files on disk
  3.  
  4.            Another Public Domain Program brought to you by
  5.  
  6.                          P. L. OLYMPIA, Ph.D.
  7.                          Darwin Systems, Inc.
  8.                    Sysop, Darwin BBS, 301-251-9206
  9.  
  10. UPDATE NOTES:
  11.  
  12.   02/07/86  - DBSTRUPO version 1, first release
  13.   05/23/86  - Version 1.1
  14.               Fixed bug related to dBASE III header file fooling us
  15.               if the file came from Ashton-Tate's dCONVERT utility
  16.  
  17.   05/29/86  - Complete rewrite of the program in Lattice C v 2.04
  18.             - Now lists structure of both dBASE II and dBASE III
  19.               files on disk. Program knows automatically which is
  20.               which. dBase II files will have a note "*dBASE II*" on
  21.               the header line of output.
  22.             - Output identical to dBASE III's LIST STRUCTURE command
  23.  
  24.   08/16/86  - version 2.1
  25.               Corrects a bug where the program aborted with a message
  26.               'File not found' after it has processed about 20 files.
  27.               While I was at it, I shranked the code a few thousand bytes 
  28.               more. If you find any more bugs, let me know and I'll try to
  29.               learn C before I program with it any more (heh, heh).
  30.  
  31.  
  32. WHAT IN THE WORLD IS DBSTRUPO?
  33. ------------------------------
  34.  
  35.      DBSTRUPO allows you to display the structure of all dBASE II and
  36.      dBASE III data  bases  on  a given disk or subdirectory with  a
  37.      single  command invocation.  It recognizes all dBASE DBF files
  38.      created by all versions of dBASE (including dB3+), all dBASE
  39.      compilers and add-on products. The  structure listings may be
  40.      redirected to the printer or  to  a  file.  Redirecting  the
  41.      output to  a  file  gives  you  the flexibility of including the
  42.      data in your system documentation.
  43.  
  44.      You  don't  need dBASE  to run this  program.  In  fact, most
  45.      people  will run this program in DOS.   However,  you may also
  46.      execute the program from within dBASE via the dBASE RUN (or !)
  47.      command.
  48.  
  49.  
  50. WHY DO YOU NEED IT?
  51. -------------------
  52.  
  53.     The alternative is to go to dBASE, USE <dbf> for each of your
  54.     data bases, SET ALTERNATE TO <outfile>, SET ALTE ON, then do
  55.     LIST STRU, then finally, CLOSE ALTE or QUIT.  If you have dBASE II 
  56.     files, you get out, then do a similar procedure. That can be a pain, 
  57.     even with one DBF file.
  58.  
  59.     I use this program to list the structure of all DBF's related to
  60.     a given application, then include the redirected output in the
  61.     MAIN PRG file as internal documentation. I include the same data
  62.     in the system's printed documentation.  I also use the program to
  63.     do a quick check on a DBF structure without having to bother
  64.     loading either dBASE II or III.
  65.  
  66. COMMAND SYNTAX
  67. --------------
  68.  
  69.      DBSTRUPO [drive\path\ambiguous-filename]  [>dosdev]
  70.  
  71.      You may specify drive,  path, any wildcard filenames, all of these
  72. or none of these. How's that for taking care of everything you want?
  73.  
  74.      You  may redirect the output to "dosdev" which is any  valid  DOS
  75. device, for example, PRN, or  any file you name.
  76.  
  77.  
  78. EXAMPLES
  79. --------
  80.  
  81. 1. Example 1
  82.  
  83.    DBSTRUPO  C:\DB\*      >A:MYDOC.TXT
  84.    DBSTRUPO  C:\DB\*.DBF  >A:MYDOC.TXT
  85.    DBSTRUPO  C:\DB\       >A:MYDOC.TXT
  86.  
  87.      All  the  above examples will display the structure of all  dBASE
  88. DBF files on the C:\DB subdirectory and redirect the output to the file
  89. A:MYDOC.TXT.  If  A:MYDOC.TXT already exists, it will be overwritten.
  90.  
  91.  
  92. 2. Example 2
  93.  
  94.    DBSTRUPO
  95.  
  96.      will  display  the structure of all dBASE  DBF  files  on  the
  97. current directory to the screen only.
  98.  
  99.  
  100. 3. Example 3
  101.  
  102.    DBSTRUPO T*.DBF >PRN
  103.    DBSTRUPO T*     >PRN
  104.  
  105.     All  will display the structure of all dBASE  DBF files  whose
  106. filenames  begin with "T" on the default directory to the printer.
  107.  
  108.  
  109. 4. Example 4
  110.  
  111.     DBSTRUPO B:
  112.  
  113.   (This is your quiz. If you've been paying attention, you should know
  114. what this command does).
  115.  
  116. SAMPLE OUTPUT
  117. -------------
  118.  
  119.    If TEST.DBF and TEST2.DBF are the only DBF files on the
  120.    subdirectory, D:\TEMP\, and you are logged into that subdirectory,
  121.    then each of the folowing commands:
  122.  
  123.       DBSTRUPO
  124.       DBSTRUPO D:
  125.       DBSTRUPO D:\TEMP\
  126.       DBSTRUPO *
  127.       DBSTRUPO D:\TEMP\T
  128.       DBSTRUPO T
  129.  
  130.    will produce the following output:
  131.  
  132. Structure for database : D:\TEMP\TEST.DBF
  133. Number of data records : 0
  134. Date of last update    : 5/29/86
  135. Field  Field Name  Type       Width    Dec
  136.     1  NAME        Character     25
  137.     2  AGE         Numeric        3
  138.     3  SALARY      Numeric       10      2
  139.     4  BIGNUM      Numeric       12     10
  140.     5  DOB         Date           8
  141.     6  T_F         Logical        1
  142.     7  NOTE        Memo          10
  143. ** Total **                      70
  144.  
  145.  
  146. Structure for database : D:\TEMP\TEST2.DBF      *dBASE II*
  147. Number of data records : 0
  148. Date of last update    : 5/29/86
  149. Field  Field Name  Type       Width    Dec
  150.     1  NAME        Character     40
  151.     2  AGE         Numeric        3
  152.     3  SALARY      Numeric       14     10
  153.     4  T:F         Logical        1
  154. ** Total **                      59
  155.  
  156.   Note that the TOTAL value is one more than the sum of the Width
  157.   column entries. The extra byte is due to the dBASE delete flag.
  158.  
  159.  
  160. SOME NOTES ABOUT THE C LANGUAGE
  161. -------------------------------
  162.  
  163.    Many years ago, I started looking at C while I was working with
  164.    CP/M. I bought a bunch of compilers but never got around to really
  165.    using them, because I could do everything I wanted to do with
  166.    BASIC, PL/1, FORTRAN, dBASE, 8080 Assembler and (shudder!) COBOL.
  167.  
  168.    Earlier this month, I was vacationing in Key West (Florida is my
  169.    favorite state, having gone to school in Gainesville) and promptly
  170.    got sick. Luckily, I brought with me the C Primer Plus book by Waite
  171.    and started studying the language then.  Although I learned most
  172.    of my languages on my own (from IBM mainframe manuals, no less), I
  173.    can say that C is by far the hardest language for me to learn
  174.    (that could also be because my brain has deteriorated now). While I
  175.    learned PL/1 from IBM manuals in 3 days, ADA for CP/M in 2 days,
  176.    it took me about a week to get going in C.
  177.  
  178.    Now people ask me what is the best way to learn C. I really don't
  179.    know, but all I did was read Waite's book, then looked at a bunch
  180.    of C programs in the public domain from my BBS.  Without these PD
  181.    programs, I am sure I'd have a heck of a time. Thus, I want to
  182.    thank the following people whose programs I used to learn and
  183.    write DBSTRUPO:  Ross Nelson, Tony Movson, David Purks.
  184.  
  185.    DBSTRUPO.C probably is not the best example of C code. It is my
  186.    first real C program, after all. If I have the time I will clean
  187.    it up a bit and release the source code to the public domain.
  188.  
  189.    Since I am still learning, I would like to request the C gurus out
  190.    there and other callers with good examples of C codes to please
  191.    send them to my BBS.  For those who still program in BASIC and
  192.    others, I want to say that C is fantastic, compiles and executes
  193.    fast and produces much smaller EXE file. I leave you Anthony's Law
  194.    of Force: "Don't force it; get a larger hammer."
  195.  
  196.  
  197. AND NOW A WORD FROM YOUR SPONSOR
  198. --------------------------------
  199.  
  200.      DBSTRUPO  is copyrighted by me,  but I am hereby releasing it  to
  201. the  public domain for all NON-COMMERCIAL  uses,  provided:  (oh,  oh,
  202. here's the hitch)
  203.  
  204.   1. Both  DBSTRUPO.COM and DBSTRUPO.DOC (this file)  are  distributed
  205.      together.
  206.  
  207.   2. Neither  file is altered in any way.  If you want to alter files,
  208.      write your own.
  209.  
  210.   3. You  don't charge anything for distributing this  program.  I  am
  211.      giving this to you for free, so you do the same.
  212.  
  213.  
  214.      All  monetary  contributions  for  this  program  are  graciously
  215. declined.  If you really like me that much, buy my other programs such
  216. as  MEMOPO  (dBASE Memo Field Utility for the Civilized) or send  your
  217. donation to my "Shareware" program FCPO1 (Electronic Filing  Cabinet),
  218. or  send something new and useful (public domain only) to my  BBS.  If
  219. you can't do any of the above, just be nice to your folks.
  220.  
  221.      Peace be with you, Brother.
  222.