home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / members.zip / MEMBERS.TXT < prev    next >
Text File  |  1986-10-20  |  10KB  |  213 lines

  1.              MEMBERS -- Membership Tracking Package
  2.                        Code Documentation
  3.  
  4. (The  following code documentation is provided in place the  user 
  5. documentation normally found here.)  
  6.  
  7. General Comments
  8. ----------------
  9.  
  10. Functionally,  the MEMBERS program is very basic (maintain a mem-
  11. bers list and print reports and labels from it).  It is presented 
  12. as  an  example  of a user-interface design.   I have  used  this 
  13. design  in several more complex applications and am pleased  with 
  14. its performance.   The menu control code, contained in MDMAIN and 
  15. MDPROC, is very easy to recycle and modify, allowing more time to 
  16. concentrate on specifics of the application.   I have also  found 
  17. that  the  design requires less user training than others I  have 
  18. used.  If you find any part if this program useful,  you are wel-
  19. come to use it under one condition, IMPROVE IT FIRST!.
  20.  
  21.  
  22. Module Dispatch Structure
  23. -------------------------
  24.  
  25.           - * -------------------------
  26.          |          |       |         |                     
  27.          |         AM-1  MDKEYSET  MDFIELDS             
  28.          |
  29.          |- Edit ------------------------------------------
  30.          |          |       |         |         |         | 
  31.          |         AM-2   MDMOD    MDRECALL  MDPACK    MDINDEX
  32.          |
  33. MDMAIN --|- Setup -------------------------------
  34.          |          |       |         |         |           
  35.          |         AM-3  MDMODQRY  MDMODFRM  MDMODLBL   
  36.          |
  37.          |- Reports -------------------
  38.          |          |       |         |                     
  39.          |         AM-4  MDREPORT  MDLABEL              
  40.          |
  41.           - Help ----------------------
  42.                     |       |         |                     
  43.                    AM-5  MDSHODOC  MDSHODOC              
  44.                             
  45.  
  46. PRG File Notes
  47. --------------
  48.  
  49. MDMAIN    This is the master control program for the application. 
  50.           It   is  responsible  for  environment  initialization, 
  51.           loading in-memory procedures (MDPROC),  file checking & 
  52.           verification  (via MDGEN),  error  trap  initialization 
  53.           (ERRCHK) and menu control. All other modules are called 
  54.           directly or indirectly by MDMAIN.
  55. è
  56. MDPROC    This  file  holds  the  in-memory  procedures  used  by 
  57.           MEMBERS.  There  are three basic types of procedures in 
  58.           this file:
  59.  
  60.           - utility procs for color control, message display etc.
  61.           - menu decode and display procedures
  62.           - @ GET/SAY procs (placed here for speed mostly)
  63.  
  64. MDGEN     This  module is executed once by MDMAIN.  It checks the 
  65.           directory for various MEM,  DBF,  NDX files required by 
  66.           the  package.   Where  possible,   missing  files   are 
  67.           constructed by MDGEN.
  68.  
  69. ERRCHK    This  is the error trap module (executed via ON ERROR). 
  70.           It attempts recovery from index file errors and printer 
  71.           errors.  All other errors are recorded along with other 
  72.           program status in an ERR file.  Non-recoverable  errors 
  73.           cause program execution to be terminated. 
  74.  
  75. AM-1      This  module displays a quick-help screen for pull-down 
  76.           menu #1 (* menu).
  77.  
  78. MDKEYSET  This  module is a facility allowing the user to  assign 
  79.           text  to function keys F2 thru F10.   The function  key 
  80.           text is recorded in MDKEYS.DBF for subsequent sessions.
  81.   
  82. MDKEYINT  This module reads MDKEYS.DBF and sets the function  key 
  83.           text accordingly. It is called by MDMAIN during startup 
  84.           and by MDKEYSET.
  85.  
  86. MDFIELDS  This  module displays the name and description of  each 
  87.           field  in  the MEMBERS database.   The  information  is 
  88.           pulled  from  the  GENMBR.DBF  file  which  also  holds 
  89.           the field information necessary to create MEMBERS.DBF.
  90.  
  91. AM-2      This  module displays a quick-help screen for pull-down 
  92.           menu #2 (Edit menu).
  93.  
  94. MDMOD     This  module  houses the Edit facility for the  MEMBERS 
  95.           database.   It initially displays a setup screen  which 
  96.           allows the user to select an index file, and optionally 
  97.           select  a query (.QRY) file from those available on the 
  98.           directory.  When  setup is complete,  it  displays  the 
  99.           Membership  Information Form screen.  At this point the 
  100.           user  is free to edit the displayed record  or  perform 
  101.           any  of the following via keys displayed at the  bottom 
  102.           of the screen:
  103.  
  104.           PgUp   - go to previous record
  105.           PgDn   - go to next record
  106.           ^Home  - append a new blank record (and display it)
  107.           F1     - mark/un-mark record as deleted
  108.           ^PgUp  - search for a record based on the index file
  109.                    selected.è          ^End   - return to menu
  110.  
  111.  
  112.           If  a query file is selected,  it is used to set  up  a 
  113.           filter  which  limits the accessable records  to  those 
  114.           matching the query specifications.
  115.  
  116. MDRECALL  This  module  will  recall all deleted records  in  the 
  117.           MEMBERS database.
  118.  
  119. MDPACK    This module packs the MEMBERS database.
  120.  
  121. MDINDEX   This  module  re-constructs  all  index  files.   (Uses 
  122.           original index commmands, not the reindex command.)
  123.  
  124. AM-3      This  module displays a quick-help screen for pull-down 
  125.           menu #3 (Setup menu).
  126.  
  127. MDMODQRY  This  module allows the dBase MODIFY QUERY facility  to 
  128.           be  executed from the menu.   It first displays a query 
  129.           file selection screen showing any existing query  files 
  130.           on  the directory.  When the user has selected a new or 
  131.           existing  file,  it  opens MEMBERS.DBF (so  fields  are 
  132.           accessable) and runs MODIFY QUERY [user's  file].  When 
  133.           the user exits MODIFY QUERY, the database is closed and 
  134.           control is returned to MDMAIN.
  135.  
  136. MDMODFRM  This  module allows the dBase MODIFY REPORT facility to 
  137.           be executed from the menu.   It first displays a report 
  138.           file selection screen showing any existing report files 
  139.           on the directory.  When the user has selected a new  or 
  140.           existing  file,  it  opens MEMBERS.DBF (so  fields  are 
  141.           accessable) and runs MODIFY REPORT [user's file].  When 
  142.           the user exits MODIFY REPORT the database is closed and 
  143.           control is returned to MDMAIN.
  144.  
  145. MDMODLBL  This  module allows the dBase MODIFY LABEL facility  to 
  146.           be  executed from the menu.   It first displays a label 
  147.           file selection screen showing any existing label  files 
  148.           on  the directory.  When the user has selected a new or 
  149.           existing  file,  it  opens MEMBERS.DBF (so  fields  are 
  150.           accessable) and runs MODIFY LABEL [user's  file].  When 
  151.           the user exits MODIFY LABEL, the database is closed and 
  152.           control is returned to MDMAIN.
  153.  
  154. AM-4      This  module displays a quick-help screen for pull-down 
  155.           menu #4 (Reports menu).
  156.  
  157. MDREPORT  This  module houses the Report facility for the MEMBERS 
  158.           database.   It initially displays a setup screen  which 
  159.           allows  the user to select the output device (Screen or 
  160.           Printer),   report  order  (index),  report  form  file 
  161.           (defaults  to  LIST80) and optionally  select  a  query  
  162.           file. When setup is complete, it sets up a filter (if a 
  163.           query  file  was  selected)  and checks  for  an  empty è          report.  If records are found, the report is printed on 
  164.           the selected output device.  Before the REPORT  command 
  165.           is  executed,  STOPRPT.PRG  is  set as  the  ON  ESCAPE 
  166.           processor  and  allows the user to abort the report  by 
  167.           pressing ESC.  
  168.  
  169. MDLABEL   This  module houses the mailing label facility for  the 
  170.           MEMBERS database.  It initially displays a setup screen 
  171.           which  allows  the  user to select  the  output  device 
  172.           (Screen or Printer),  label order (index),  label  form 
  173.           file (defaults to ONE-UP) and optionally select a query  
  174.           file. When setup is complete, it sets up a filter (if a 
  175.           query  file was selected) and checks for an empty list. 
  176.           If  records  are  found,  labels  are  printed  on  the 
  177.           selected  output device.  Before the LABEL  command  is 
  178.           executed, STOPRPT.PRG is set as the ON ESCAPE processor 
  179.           and allows the user to abort label printing by pressing 
  180.           ESC.  
  181.  
  182.  
  183. STOPRPT   This  is the ON ESCAPE processor which is activated bye 
  184.           MDREPORT  and  MDLABEL.  It intercepts  ESC  keystrokes 
  185.           during  report  or label printing and  cleanly  returns 
  186.           control to MDMAIN.
  187.  
  188. AM-5      This  module displays a quick-help screen for pull-down 
  189.           menu #5 (Help menu).
  190.  
  191. MDSHODOC  This module searches the directory for MEMBERS.TXT  and 
  192.           either  prints or displays it depending on the  logical 
  193.           call parameter.
  194.  
  195.  
  196. Other Files
  197. -----------
  198.  
  199. MEMBERS.BAT  -- Batch file to start the application.
  200. GENMBR.DBF   -- "Template" for creating MEMBERS.DBF. Also holds
  201.                 field descriptions.
  202. MEMBERS.DBF  -- Members Information Database.  
  203. MDKEYS.DBF   -- Database which holds function key text.
  204. MDVARS.MEM   -- Holds public mem-vars. Generally used to save
  205.                 anything needed from session to session. In
  206.                 this application it "remembers" which pull-down
  207.                 menu was active when the user exited the program.
  208. EXPIRED.QRY  -- An example query file (selects expired members).
  209. RENEW.QRY    -- Another example query file.
  210. LIST80.FRM   -- Report form for 80-column listing of member info.
  211. ONE-UP.LBL   -- Label format file for one-up labels.
  212.  
  213.