home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / mailit.zip / MAILGLOB.INC < prev    next >
Text File  |  1986-03-08  |  5KB  |  104 lines

  1.   { File = MAILGLOB.INC -- Include file for Reliance Mailing List globals.
  2.     WPM, 2/24/86 }
  3.  
  4.   { COPYRIGHT (c) 1986, Wm Meacham, 1004 Elm Street, Austin, Tx  78703 }
  5.  
  6. const
  7.     scr_fname  : string[14] = 'SCR.RML' ;    { system control file }
  8.     mf_fname   : string[14] = 'MASTER.RML' ; { master file }
  9.     ix1_fname  : string[14] = 'INDEX1.RML' ; { index file -- last name }
  10.     ix2_fname  : string[14] = 'INDEX2.RML' ; { index file -- zip + last name }
  11.     blanks     : string[30] = '                              ' ;
  12.  
  13.     wid   = 12 ;        { total width for $ amts, including decimal point }
  14.     frac  = 2 ;         { fractional part for $ amts -- 999999999.99 }
  15.     no_dups = 0 ;       { parameter for proc OpenIndex }
  16.     dups_ok = 1 ;       { parameter for proc OpenIndex }
  17.     key1_len = 6 ;      { length of key string -- 5 chars of last name }
  18.     key2_len = 15 ;     { length of key string -- zip + 5 chars of last name }
  19.     mf_rec_size = 216 ; { length of master record }
  20.     max_lines = 58 ;    { maximum number of lines on printed page }
  21.  
  22. type
  23.     str1   = string[1] ;
  24.     str3   = string[3] ;
  25.     str4   = string[4] ;
  26.     str5   = string[5] ;
  27.     str9   = string[9] ;
  28.     str14  = string[14] ;
  29.     str20  = string[20] ;
  30.     str30  = string[30] ;
  31.     str80  = string[80] ;
  32.     str132 = string[132] ;
  33.  
  34.     option = (count, add, change, del_rec,
  35.               contribution, list, labels, mailmerge) ;
  36.                                    { To pick needed proc from within overlay }
  37.  
  38.     prt_criterion = (all, pcat, pct, pzip, dt, amt) ; { which names to print }
  39.     sort_criterion = (name, szip) ;                   { how to sort }
  40.  
  41.     boolarray   = array [1 .. 8] of boolean ;
  42.     num_str_typ = string[15] ;    { '-999,999,999.99' }
  43.  
  44.     key1_typ = str5 ;
  45.       { The key is the first five characters of the last name, stripped of
  46.         blanks and capitalized. }
  47.  
  48.     key2_typ = str14 ; { zip code + key1_typ }
  49.  
  50.     mf_rec = record               { Master File record }
  51.         status     : integer ;    { 0 = active, else deleted }   { 2}
  52.         last_name  : str30 ;                                     {31}
  53.         frst_name  : string[18] ;                                {19}
  54.         title      : string[9] ;  { eg, Dr., Mr., Ms., etc }     {10}
  55.         salutation : string[11] ; { Dear ... }                   {12}
  56.         addr1      : string[25] ;                                {26}
  57.         addr2      : string[25] ;                                {26}
  58.         city       : string[23] ;                                {24}
  59.         state      : string[2] ;                                 { 3}
  60.         zip        : str9 ;                                      {10}
  61.         home_phon  : string[14] ;                                {15}
  62.         work_phon  : string[14] ;                                {15}
  63.         precinct   : str3 ;                                      { 4}
  64.         last_amt   : real ;       { last contribution amount }   { 6}
  65.         last_date  : date ;       { last contribution date }     { 6}
  66.         tot_amt    : real ;       { total contribution amount }  { 6}
  67.         flags      : byte ;       { 8 booleans, user-defined }   { 1}
  68.     end ;                                                { total 216}
  69.  
  70.     scr_rec = record              { System Control Record }
  71.         ID       : str30 ;        { descriptive identification }
  72.         num_k,                    { disk capacity }
  73.         max_rec,                  { max master records allowed }
  74.         num_recs : integer ;      { number of records used }
  75.         prt_init,                 { printer initialization string }
  76.         prt_rset : str4 ;         {    "    reset string }
  77.         cat_name : array [1..8] of str20 ; { selection category names }
  78.     end ;
  79.  
  80. var
  81.     scr         : scr_rec ;       { system control record }
  82.     master      : mf_rec ;        { master record }
  83.     key1        : key1_typ ;      { key1 work area }
  84.     key2        : key2_typ ;      { key2 work area }
  85.  
  86.     scr_file    : file of scr_rec ;
  87.     mf_file     : datafile ;      { master file -- type def. in ACCESS.BOX }
  88.     ix1_file    : indexfile ;     { index file -- type def. in ACCESS.BOX }
  89.     ix2_file    : indexfile ;     { index file -- type def. in ACCESS.BOX }
  90.  
  91.     rec_num     : integer ;       { relative record number of master rec }
  92.     cat         : boolarray ;     { selection categories }
  93.     choice      : integer ;       { to get menu selection }
  94.     cur_proc_dt : date ;          { current processing date }
  95.     drive       : str1 ;          { drive where data files exist }
  96.  
  97.     mask        : byte ;          { to select category }
  98.     pcinct      : str3 ;          { to select precinct }
  99.     zipcode     : str9 ;          { to select zip code }
  100.     lastdt      : date ;          { to select date }
  101.     contrib     : real ;          { to select amount }
  102.  
  103. { ----- EOF MAILGLOB.INC ------------------------------------------- }
  104.