home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / busi / cim35.zip / CIM.TXT < prev    next >
Text File  |  1988-11-09  |  52KB  |  1,058 lines

  1.  
  2.  
  3.  
  4.  
  5.                      This is a user-supported program.
  6.             If you find this program of value, please register.
  7.                           Report any Problems to:
  8.  
  9.                               David E. Miller
  10.                              8207 Collier Place
  11.                               Tampa, FL  33637
  12.                                 813-985-4444
  13.  
  14.       
  15.                                   C. I. M.
  16.                         Contact Information Manager
  17.  
  18.                                                            Version 3.5
  19.                                                       November 9, 1988
  20.  
  21.      CIM is a data base manager for information used to contact people
  22.      or businesses.  In other words,  it stores, retrieves, and prints
  23.      addresses and phone numbers.  Several of CIM's features are:
  24.  
  25.           A.   Mailing labels of any  type may be printed, as  well as
  26.                rolodex cards or custom reports on plain paper.
  27.  
  28.           B.   Output can  be specifically controlled:   which fields,
  29.                the sequence of fields, as well  as where to print them
  30.                can be specified.   Also, the number of columns  can be
  31.                specified.   Page size  and margins  are all under  the
  32.                user's control.
  33.  
  34.           C.   Records can be sorted by name, zip code, or any field.
  35.  
  36.           D.   Notes can be added to records.
  37.  
  38.           E.   Over  32,000 records per file can  be managed using all
  39.                features of CIM.   If you  need more records per  file,
  40.                contact me.  I  can supply you with a version that will
  41.                handle over 2 billion records!
  42.  
  43.           F.   Allows handling any number of separate files.
  44.  
  45.           G.   Output can be directed to screen, printer, or disk.
  46.  
  47.           H.   Search capability for every field as well as for notes.
  48.  
  49.           I.   ASCII files may be imported.   Files from dBASE III can
  50.                be converted in a simple two step process.
  51.  
  52.           J.   Easy to use through the use of menus.
  53.  
  54.      CIM is being distributed under the Shareware concept.  This means
  55.      you can use  the program all  you want absolutely  free.  If  you
  56.      find  the program beneficial, please consider sending a contribu-
  57.      tion to its creator.  The  contribution should reflect either how
  58.      much you value  the program, or  your current economic  position,
  59.      whichever is  lower.  Full  registration is $20, but  $10 or less
  60.      will register your current copy.  All contributors are registered
  61.      with  the contribution amount  recorded.  Full  registration pro-
  62.      vides support and updates.  Any  kind of registration provokes me
  63.      to continue supplying updates  to the public domain and  to write
  64.      other quality programs for the  public domain.  If you enjoy  the
  65.  
  66.                                      1
  67.  
  68.  
  69.  
  70.      benefits of public  domain programs, please support the system by
  71.      sending a contribution.
  72.  
  73.      CIM may be copied and distributed freely by anyone.  All I ask is
  74.      that this  documentation accompany every copy unaltered.  You may
  75.      even sell this program and make a profit yourself as long  as you
  76.      include this documentation and do not charge more than $3.
  77.  
  78.      To  register, send your  name, mailing address,  and phone number
  79.      to:
  80.  
  81.                               David E. Miller
  82.                               8207 Collier Place
  83.                               Tampa, FL  33637
  84.                               813-985-4444
  85.  
  86.      The source code is available  upon request to any user sending  a
  87.      contribution of $25 or more.  The source code is written in Turbo
  88.      Pascal 4.0 and may be modified in any way the user desires.
  89.  
  90.                               System Overview
  91.  
  92.      Previous versions  (2.6 and earlier)  of CIM were  distributed as
  93.      CIM.COM with a memory overlay file, CIM.000.  Now, because of the
  94.      purchase of a new Turbo Pascal 4.0 compiler, CIM is CIM.EXE.  The
  95.      program is  larger like  this, but  there is  no need for  memory
  96.      overlay files.   The entire program  resides in memory.   CIM.EXE
  97.      will automatically determine whatever type of monitor and monitor
  98.      card  you  have (Monochrome,  CGA,  EGA,  VGA, etc.)  and  behave
  99.      appropriately.  
  100.  
  101.      CIM manages  ten fields  for each  record.   The ten  fields are:
  102.      First Name,  Last Name,  Title, Business,  Address, City,  State,
  103.      Zip, Phone, and Qualifier.  Records can be sorted by any of these
  104.      fields and output can be specified  with any combination of these
  105.      fields.   The records utilize the  same amount of  disk space re-
  106.      gardless of how much information is typed into each field.
  107.  
  108.      CIM  allows adding notes  to records.  In  order to conserve disk
  109.      space, notes are kept in a separate note file which is indexed to
  110.      the data file.  The note file is given the same name as the  main
  111.      file except that the extension is changed to NTS.
  112.  
  113.      To exit most  screens, including CIM itself, press Esc or F1.  F1
  114.      has a partial exiting function at some screens, that  is, it will
  115.      allow you to save whatever you  are working on at the time.   Esc
  116.      should always abort whatever procedure  you are doing, unless you
  117.      are in a  field which  allows entering the  Escape character  for
  118.      printer control, such as  the Code field on the  Report Generator
  119.      menu.  
  120.  
  121.      F1 will not exit the program  at the main menu but Esc will.   In
  122.      most cases (maybe all cases, I  can't remember), all the function
  123.      keys will act as F1, so if you prefer F10, for example, try using
  124.      it.
  125.  
  126.      Esc may allow stopping some processes  as well, such as searching
  127.      through the file.  
  128.  
  129.      To start CIM, have CIM.EXE in the default drive and enter  CIM at
  130.      the DOS prompt.   The main menu  will appear.  If  PROFILE.CIM is
  131.  
  132.                                      2
  133.  
  134.  
  135.  
  136.      not  on the default drive, a  message will appear before the main
  137.      menu informing you of this.  You may create the file by going di-
  138.      rectly to the Utilities menu and entering S.  
  139.  
  140.  
  141.                                The Main Menu
  142.  
  143.      The top line shows the file to be  used for most operations.  You
  144.      may change the name  of the file by pressing  F.  Drive and  path
  145.      specifications may be placed  in the file name.   Many selections
  146.      from the main menu act upon a  file.  Instead of asking you for a
  147.      file name, the file at the top of  the menu is the file used.   I
  148.      suggest using the  extension .DAT (or .DTA) on  your file name to
  149.      make it easily distinguishable from the  note file, which has the
  150.      extension .NTS.   The extension  you use can  be selected at  the
  151.      Utilities menu.  Save  the profile after selecting  an extension.
  152.      Once  the extension has  been set here,  you need  only enter the
  153.      main name  when changing  the file  name, e.g.,  CIM will  become
  154.      CIM.DAT.
  155.  
  156.      The second line shows where most output will be sent.  Press O to
  157.      set the destination of output to terminal, printer, or disk.  The
  158.      printer port you use may  be set at the utilities menu.  Save the
  159.      profile if you change it and want it to remain changed  everytime
  160.      you use CIM.
  161.  
  162.      The  output setting  does not  affect  some options  because some
  163.      options, such  as C)ombine  or split  file, must  send output  to
  164.      disk.  In such cases, you will be allowed  to set the output file
  165.      name from the particular option selected.
  166.  
  167.      Some menu options  allow toggling settings, i.e.,  switching bet-
  168.      ween on and off conditions.  In such cases, the displayed setting
  169.      is the current setting to be performed.   For example, if you are
  170.      setting  a search  option  for case  sensitive searches,  and the
  171.      screen displays C)ase  not sensitive, pressing C will  change the
  172.      setting to  case sensitive,  and the  display will become:  C)ase
  173.      sensitive, meaning a search for Sue will not stop at sue.
  174.  
  175.      Free disk space is  required when sorting or compressing  a file.
  176.      Therefore, always be sure there is as much free disk space as the
  177.      size of  the current  data file.   If there is  insufficient disk
  178.      space when doing either  of these procedures, you may  be allowed
  179.      to continue the  procedure if  you have another  drive with  free
  180.      disk space, enough  for the size of  the file you are  sorting or
  181.      compressing.
  182.  
  183.      The use of a ram disk is highly recommended for those who do  not
  184.      have hard  disks.  Batch  files are  useful for copying  the data
  185.      files to the ram drive and logging on that drive.
  186.  
  187.  
  188.                               Creating a file
  189.  
  190.      There are  four ways to create  a CIM file:   1) select A  at the
  191.      main menu to  enter records from the keyboard, 2) select I at the
  192.      main menu to import  an ASCII file, 3) select C  at the main menu
  193.      to create  a new file from  records contained in  an existing CIM
  194.      file, or 4) use  the separate program CONVERT.COM  if you used  a
  195.      former program of  mine called Personal Roladex  (spelled with an
  196.      'a'), and you want to convert your roladex files to CIM files.  
  197.  
  198.                                      3
  199.  
  200.  
  201.  
  202.  
  203.      A)dd entries or create new file
  204.  
  205.      If a file does not exist when  selecting this option, you will be
  206.      asked if  you want  to create  the file.   Respond  with Y  and a
  207.      screen  will appear  displaying the  ten fields  that comprise  a
  208.      single record.   Most fields  are self  explanatory (First  Name,
  209.      Last Name, Title, etc.).  Keep  in mind that not all fields  have
  210.      to be printed.  Therefore, you can enter titles for some  and not
  211.      for others.   The decision  of what  information to print  can be
  212.      made later, not now.  The  last field is a qualifier field  which
  213.      is  used  to qualify  a record  for  inclusion or  exclusion when
  214.      processing records for output to terminal, printer, or disk. 
  215.  
  216.      The Qualifier field is likely to be explained easiest by example.
  217.      I regularly print  a Phone  list and  an Address list  and use  a
  218.      coding system to manage this list.  For example, all records with
  219.      a phone number  are assigned a  P in the  qualifier field  (other
  220.      qualifier characters may also  be present).  All records  with an
  221.      address are assigned  an A.  All records with both a phone and an
  222.      address are assigned  a PA in the qualifier field.   I frequently
  223.      do not  want records  on my  current list,  but I  don't want  to
  224.      delete them from the file; therefore, I code an L for those names
  225.      I want on  my current list.   I maintain order in  the characters
  226.      such that a  record to appear on  my phone list and  address list
  227.      would have the  qualifier code  PLA.  When  processing the  phone
  228.      list, I specify PL, and when processing the address list I speci-
  229.      fy LA.  This restricts output to only those records I want.  This
  230.      way I do not get a record of a person on my phone list for whom I
  231.      do not have a phone number, and I do not get a record of a person
  232.      on my address list for whom I do not have an address.
  233.  
  234.      When  entering information in  the fields, standard  editing keys
  235.      are allowed as follows:
  236.  
  237.      Cursor keys    move left or right one character
  238.      Home      moves to first character of field
  239.      End            moves to last character of field
  240.      Ins            toggles insert mode on or off
  241.      Del            deletes character above the cursor
  242.      Backspace deletes character to left of cursor
  243.      Ctrl-End       erases characters from cursor to end of line
  244.      Ctrl-cursor    moves left or right one word (to next space)
  245.  
  246.      The up arrow will go to the previous field.
  247.      The down arrow will go to the next field.
  248.  
  249.      Esc will abort the editing and return you to the main menu.
  250.  
  251.      F1 will skip all fields and go to the last prompt allowing you to
  252.      save or not save the record.
  253.  
  254.      F4 will toggle whether or not  the field will be cleared for  the
  255.      next record.   When F4 is pressed, the  name of the field changes
  256.      color (default=red)  to  indicate  that the  field  will  not  be
  257.      cleared.  This saves typing when  a field has a common value  for
  258.      many consecutive records:  for example, when consecutive  records
  259.      have the same  place of business, or  the same city, or  the same
  260.      qualifier.
  261.  
  262.      Entry on a field is considered completed when the carriage return
  263.  
  264.                                      4
  265.  
  266.  
  267.  
  268.      key is pressed.  
  269.  
  270.      Entering Y  or the carriage return (Enter Key) to the last prompt
  271.      saves the information to disk and allows you to continue entering
  272.      new names.
  273.  
  274.      When you are finished  entering information, press Esc  to return
  275.      to the main menu.  This may be  pressed at any field.  Any infor-
  276.      mation present in  any of the fields  is not written to  the file
  277.      when Esc is pressed.
  278.  
  279.      It is a good  idea to not add spaces  at the end of fields.   The
  280.      computer recognizes  spaces like  any other  character, and  when
  281.      printing output, you  may cause  those spaces to  print into  the
  282.      next field  or column being printed.  If  a number of fields have
  283.      trailing spaces, the  utilities menu has an option to  get rid of
  284.      all trailing spaces in the file.
  285.  
  286.  
  287.      I)mport ASCII file
  288.  
  289.      Before selecting  this option,  one  should select  the A  option
  290.      described above even if he is not going to keep the file created.
  291.      Doing so will  allow the user to become  familiar with the fields
  292.      present in CIM  before trying  to import  information into  these
  293.      fields.
  294.  
  295.      When selecting I from the main menu, a short menu appears and the
  296.      cursor will be placed in a position to enter  a file name.  Enter
  297.      here  the file name of  the ASCII file to import.   The file name
  298.      entered here will  only be read, and  a new file will  be created
  299.      with  the name of the main file indicated  at the top of the main
  300.      menu.   If the  main file already  exists, you will  be given the
  301.      option to overwrite or append to that file.  
  302.  
  303.      Most word processing and  data base files cannot be  imported di-
  304.      rectly  but must be converted to an  ASCII file first, which most
  305.      word  processors  and data  bases are  capable  of doing.   After
  306.      entering the  file name, you will be asked  if you want to change
  307.      any of the default values of the parameters.  The  default values
  308.      are  set properly for an Export ASCII file option to be discussed
  309.      later  under Processing  Data  for Output.    Answering Y  allows
  310.      specifying how the program  should expect the information  in the
  311.      ASCII file to look.  The top  line has the sequence of the fields
  312.      to expect; each field is abbreviated by the first  letter of that
  313.      field.  I  will explain the setting  of these values by  using an
  314.      example of converting a dBASE III file to a CIM file.
  315.  
  316.      Consider a  dBASE III file named  ADDRESS.DBF.  To make  an ASCII
  317.      file from ADDRESS.DBF, we would enter USE ADDRESS to retrieve the
  318.      dBASE file, and we  would enter COPY TO ADDRESS.TXT  DELIMITED to
  319.      create the ASCII  file.  We  would then exit  dBASE III with  the
  320.      QUIT command  and enter  CIM from  DOS.   Upon selecting  I)mport
  321.      ASCII  file,  we would  enter ADDRESS.TXT  for  the file  name to
  322.      import, and respond with Y to change the parameters.  ADDRESS.TXT
  323.      has the following variables  in the following order:   Last Name,
  324.      First Name, Title, Company, Street, City, State, Zip, Home Phone,
  325.      Work Phone,  membership type, and committee.   Since the sequence
  326.      here is different than the default,  we could enter the following
  327.      code for the  proper sequence: LFTBACSZP  w: PQQ.  This  sequence
  328.      tells CIM to  read the first field  as the last name,  the second
  329.  
  330.                                      5
  331.  
  332.  
  333.  
  334.      field as the first name, etc.  Notice we used B for company and A
  335.      for street because  these fields are called  Business and Address
  336.      in  CIM.  Also  notice we had both  P and Q  twice.  Whenever CIM
  337.      encounters another  field code of the same  type, it concatenates
  338.      the fields together  to form one field.  Therefore,  the home and
  339.      work phone  numbers are concatenated  together to form  one phone
  340.      number field.  You've probably already  wondered why we entered a
  341.      space and w:  between the two P's in the sequence code.  Anything
  342.      other than the ten letters F L T B A C S Z P  or Q are treated as
  343.      literals.  When  encountering a  literal, CIM looks  back to  the
  344.      last non-literal code and concatenates the  literal to the end of
  345.      that field.   The reason  for entering w: and  the spaces, there-
  346.      fore, was to  distinguish the home and  work phones in CIM.   For
  347.      example, a  home phone of 999-9999  and a work  phone of 888-8888
  348.      would appear as 999-9999  w: 888-8888 in the  CIM phone field  if
  349.      the above sequence code was used.  The last two Q's simply trans-
  350.      fer the codes used in dBASE for membership  type and committee to
  351.      the single qualifier field of CIM.
  352.  
  353.      Upon pressing the return  key, the delimiter may now  be entered.
  354.      The default delimiter is the carriage  return.  Although it looks
  355.      like  a  space, the  ASCII  code 13  is displayed  to  the right.
  356.      Generally, one should  press the  key used for  the delimiter  of
  357.      fields in the  ASCII file; however, almost any  ASCII code can be
  358.      entered by holding  the Alt  key and entering  the decimal  ASCII
  359.      code from the numeric key pad.  ADDRESS.TXT has commas as delimi-
  360.      ters, so a comma should be  pressed.  ADDRESS.TXT also has string
  361.      fields enclosed in  quotes so respond Y  to the next line.   This
  362.      tells CIM  to ignore commas  within quotes (i.e.,  double quotes:
  363.      ").  We've already entered the file name to import so we can just
  364.      press return at the last line.   If everything looks ok, we would
  365.      respond N to the prompt asking  if we want to change any  parame-
  366.      ters and CIM goes to work  importing the ASCII file.  A new  file
  367.      is created with  the name of  the main file  listed at the  first
  368.      line of the CIM main menu.
  369.  
  370.  
  371.      C)ombine or Split file
  372.  
  373.      This option of the main menu allows either combining two CIM data
  374.      base  files, or splitting a single file into one or more separate
  375.      files based upon  qualifier information.  Obviously,  this option
  376.      can only be used to create a  file from an already existing file.
  377.  
  378.      Upon  selecting C, the  Combine/Split file menu  appears.  Before
  379.      selecting R)un, the  options must  be set.   Press S  to enter  a
  380.      secondary file name.  This secondary file will be appended to the
  381.      main file if the process desired is combine file.  If the process
  382.      desired  is split  file,  the  secondary  file will  be  created.
  383.      Pressing Q allows entering a qualifier  code.  Pressing F toggles
  384.      for processing a match with  the specified qualifier, or process-
  385.      ing a everything  but matches  with the qualifier,  i.e., a  non-
  386.      match, or greater than or less than comparisons may also be done.
  387.      The displayed setting is the setting to be performed.  Toggle the
  388.      process, combine or split, by pressing  P.  The process displayed
  389.      is the process that will be  performed; therefore, if the process
  390.      says Split file, pressing P will set the option to Combine  file,
  391.      and when R is pressed, the secondary file will be appended to the
  392.      main file.  When all settings are correct, press R to make CIM go
  393.      to work.  
  394.  
  395.  
  396.                                      6
  397.  
  398.  
  399.  
  400.  
  401.      CONVERT.COM
  402.  
  403.      The  convert program  will  convert  Roladex  files,  data  files
  404.      created by ROLADEX.COM, to CIM files.   If you have not used  the
  405.      Personal Roladex program,  CONVERT.COM is not  useful to you.   I
  406.      have noticed  another program  named Rolodex.   CONVERT.COM  will
  407.      only convert Roladex files (spelled with an a) not Rolodex files.
  408.      The Roladex program had a main menu somewhat similar to CIM.   If
  409.      your old program  does not  have a similar  screen, you  probably
  410.      have a different  program than the  one I wrote, and  CONVERT.COM
  411.      will not work for you.
  412.  
  413.      To use  CONVERT.COM, simply have CONVERT.COM in the default drive
  414.      and enter CONVERT  at the DOS prompt.   You will be  prompted for
  415.      the Roladex file name to read and the new file to create.  
  416.  
  417.  
  418.                               Viewing the file
  419.  
  420.      After you have created a file, it is likely you will want to look
  421.      at it.   The simplest way  to do  this is press  B from the  main
  422.      menu.  You are immediately place at the first record of the file.
  423.      Two other methods exist to enter browsing mode.  Pressing E  will
  424.      place you immediately  at the end of  the file.  Pressing  L will
  425.      allow you to  enter a search string  or a record number  to find.
  426.      All of  these methods,  B E or  L, put  you in browsing  mode for
  427.      viewing the file.
  428.  
  429.  
  430.      L)ook for string
  431.  
  432.      Upon entering L  from the main menu,  you will be prompted  for a
  433.      search string.  Enter  any string of characters that  would match
  434.      anything in the record.  It could be a last name like Smith, or a
  435.      zip  code like 33609.   If you want to  go directly to a specific
  436.      record, enter the record number to find.  If you change your mind
  437.      and want  to return to the main  menu, press F1.  If  you want to
  438.      continue and search for the string  you entered, press the return
  439.      key.  After  you press the return key,  you will be asked  if you
  440.      want to perform a standard forward  search, a quick binary search
  441.      for last name, or a record number search.  
  442.  
  443.      If you choose  to perform a record  number search, CIM will  find
  444.      the number entered for a search string.  If you entered  a string
  445.      or nothing at all, CIM will ask you for a record number.  
  446.  
  447.      If you select standard forward search, CIM will begin looking for
  448.      a matching  string in the file  starting at the beginning  of the
  449.      file.  The search options in effect (case sensitive search, match
  450.      or none match, etc.) will be either those set during  the current
  451.      session, or the default values set in PROFILE.CIM.
  452.  
  453.      The quick binary  search is a specialized searched  that performs
  454.      properly only under  certain conditions.  The quick binary search
  455.      can only be performed when looking for a last name in a file that
  456.      is  sorted by last  name.  In  such situations, it  is very fast,
  457.      letting you know quickly if  the last name is missing.   Further-
  458.      more, if the  search string is not  found, CIM places you  at the
  459.      location in  the file where  that record  should have been.   The
  460.      search  is  case sensitive  so the  search  string must  have the
  461.  
  462.                                      7
  463.  
  464.  
  465.  
  466.      proper case.   Entering smith  as a search  string will  not find
  467.      Smith in the file when using  a quick binary search.  However,  a
  468.      standard forward search  will find  such a record  if the  search
  469.      options are set to case not sensitive.
  470.  
  471.  
  472.                                Browsing Mode
  473.  
  474.      Information displayed in Browsing Mode
  475.  
  476.      Options  B, E,  and L place  you in  browsing mode.   In browsing
  477.      mode, the very top line displays  special messages, such as error
  478.      messages, if any.  The next line displays the search string.  The
  479.      actual record is displayed  next.  Below the record,  two numbers
  480.      are displayed in parentheses.   The first number is the number of
  481.      the displayed record,  i.e., its relative  position in the  file.
  482.      The  second number is  the total number  of records  in the file.
  483.      Lastly, all the options available while in browsing mode are dis-
  484.      played.
  485.  
  486.  
  487.      Available Options in Browsing Mode
  488.  
  489.      Press F to move forward or B to move backward through the file.  
  490.      Press C to change  the search string displayed at the  top of the
  491.      screen.  If  you change  your mind about  the new search  string,
  492.      press Esc or F1 to abort the change and return the  search string
  493.      to its previous setting.
  494.  
  495.      Press  Q to put you  in editing mode  (described later) and place
  496.      you at  the qualifier  field.  This  allows quick editing  of the
  497.      frequently changed qualifier field.
  498.  
  499.      Press S to begin searching for the string displayed at the top of
  500.      the screen.   You will given several search  alternatives:  F) to
  501.      search forward  from your  current position  in the  file, B)  to
  502.      search backward from your  current position in the file, Q) to do
  503.      a quick binary search for last name which requires the file to be
  504.      sorted by  last name  (see discussion  above), N)  to search  the
  505.      notes  file, or  O) to set  the search  options.   Search options
  506.      allow: 1) making searches case sensitive, 2) making searches look
  507.      for non-matches instead  of matches or  for greater than or  less
  508.      than strings, and 3) making searches only look at qualifier codes
  509.      or all  fields except  the qualifier  code.   The search  options
  510.      display the current settings  and can be changed by  pressing the
  511.      highlighted letter.  The default settings are made by setting the
  512.      values to those  desired for  default settings and  going to  the
  513.      utilities menu to save PROFILE.CIM.
  514.  
  515.      You go directly to a specific  record by pressing R, or edit  the
  516.      record by  pressing E.  In editing mode,  Esc will abort the edit
  517.      and return you to browse mode.  You may skip fields and go to the
  518.      last prompt by pressing a function key.  For example, suppose you
  519.      were changing  a last name.   After changing the name,  press F1,
  520.      and then press Y or the carriage return to save the change.
  521.  
  522.      Press D to delete the displayed record.  You will be asked if you
  523.      want to mark the record for deletion.  Responding Y will mark the
  524.      record for  deletion.   Pressing D  again  allows undeleting  the
  525.      record.   The record will not be removed  from the file until the
  526.      file is compressed  later.  Records  may be undeleted unless  the
  527.  
  528.                                      8
  529.  
  530.  
  531.  
  532.      file is compressed.   After compression, the record is eliminated
  533.      forever.  Records marked  for deletion, while still in  the file,
  534.      are not processed when printing reports.  
  535.  
  536.      When exiting  browsing mode,  you will  be asked  if you  want to
  537.      compress  the file  and eliminate  records  marked for  deletion.
  538.      Since it may  take several minutes  for large files, you  may not
  539.      want  to  compress the  file every  time  records are  marked for
  540.      deletion.  If you have records  marked for deletion from previous
  541.      sessions and want to compress the file without deleting any addi-
  542.      tional records, undelete a record and then delete it again.  When
  543.      exiting  browsing mode you  will be prompted  for compressing the
  544.      file.
  545.  
  546.      Press P  to print the displayed record on  an envelope.  A second
  547.      screen will appear allowing you to  change the return address, to
  548.      print both  the return  address and  the mailing  address, or  to
  549.      print  only the  mailing address of  the record.   Your  name and
  550.      address  can  be the  default name  and  address by  changing the
  551.      return address here  and then going to the utilities menu to save
  552.      PROFILE.CIM. 
  553.  
  554.      Press M to insert a qualifier code without going  into edit mode.
  555.      The default  marker is *, but it may  be changed to any character
  556.      by pressing K.  When asked to press the key to use, press the key
  557.      you want to  use as a marker, or hold the  Alt key and key in the
  558.      ASCII decimal value on the numeric key pad.  To unmark a qualifi-
  559.      er code without  going into edit mode,  press U.  This  system of
  560.      marking was made  to allow  easy coding of  records for  printing
  561.      output.
  562.  
  563.      Press N to add, edit, or view a record's note.
  564.  
  565.  
  566.                            Report Generator Menu
  567.  
  568.      Selecting R, P, or  carriage return from the main menu brings you
  569.      to the forte of CIM.  You should be very pleased with the ability
  570.      of CIM to produce the kind of output you want.
  571.  
  572.      The  process file  menu displays a  box on  the left part  of the
  573.      screen which contains  codes for specifying output,  and a double
  574.      lined box on the right side which is divided into upper and lower
  575.      halves.  The upper box lists options that may be entered from the
  576.      keyboard, the lower half displays settings that determine how the
  577.      output will appear when the file is processed.  
  578.  
  579.      The top two lines of the upper box simply allow changing the file
  580.      to process and the destination of output.  These options can also
  581.      be  changed at the  main menu as discussed  previously.  The next
  582.      set of lines display various options.  Pressing P sets all values
  583.      displayed  at the bottom of the screen to settings for printing a
  584.      typical two column  phone list.  Pressing  A sets all  values for
  585.      printing an address list.  Pressing  C sets all values for print-
  586.      ing rolodex style cards.  Pressing L sets all values for process-
  587.      ing one column mailing labels.  Pressing E sets  values for writ-
  588.      ing all values to an ASCII file that is carriage return  delimit-
  589.      ed.   Settings may  be manually  set anyway the  user desires  by
  590.      pressing M or the  carriage return key.  The changed settings may
  591.      then be saved on disk  by pressing S and entering a  file name (I
  592.      suggest using extension  .SET but other extensions  are allowed),
  593.  
  594.                                      9
  595.  
  596.  
  597.  
  598.      and retrieved from disk by pressing  G and entering the appropri-
  599.      ate file name.  Pressing Q toggles the setting for finding match-
  600.      ing qualifier  codes  in the  file, or  for finding  non-matching
  601.      qualifier codes when  processing for output.   Pressing R  begins
  602.      processing the file using  the settings displayed.  Pressing  Esc
  603.      allows exiting the  process file menu  and returning to the  main
  604.      menu.
  605.  
  606.  
  607.      Manually setting values
  608.  
  609.      There  are almost no error traps  for the settings of output val-
  610.      ues.  This  is done  to allow  complete freedom to  the user  for
  611.      producing  output.   However,  this means  the  user can  provide
  612.      settings that cause CIM to produce illegible or no output.
  613.  
  614.      To enter your own settings, press M, the  carriage return, or the
  615.      down arrow to move the cursor to the first line of the lower box,
  616.      the qualifier line.  Pressing the up  arrow will start you at the
  617.      last field, the  Code Field.  At the first line, enter the quali-
  618.      fier  to match or  non-match, depending on  the setting displayed
  619.      next to qualifier at the upper right side of the screen.  If this
  620.      is the only setting you want  to change, press Esc or a  function
  621.      key  to return to the upper  box.  To continue  to the next line,
  622.      press the down arrow  or the return key; the cursor  moves to the
  623.      next line to allow changing the page  size.  If none of the other
  624.      values need changing, press Esc or  a function key to exit manual
  625.      mode.  This  is permissible at  any of the  entries to allow  the
  626.      user the luxury of not having to page down through each entry.
  627.        
  628.           Page Size:
  629.  
  630.      Page size is  the number of lines on a page.  Normally, there are
  631.      66 lines per page; however, printers may be changed to print more
  632.      or less lines per page, or pages may be longer or shorter.   Page
  633.      size could  be specified to a size smaller  than the page to con-
  634.      trol how alphabetizing  occurs.   For example, a  file sorted  by
  635.      last  name  and printed  in 3  columns  normally would  be sorted
  636.      within columns  on  the page.   To  have the  file sorted  across
  637.      columns,  page size  could be set  to the  total number  of lines
  638.      printed for each record plus the  number of lines printed between
  639.      records (Spacing).
  640.  
  641.           Begin with Record:
  642.  
  643.      This indicates the  record number with which to begin processing.
  644.      This is helpful if paper jams occur and you don't want to reprint
  645.      the entire file.
  646.  
  647.  
  648.           Top Margin:
  649.  
  650.      The top margin is simply the number of lines to print at  the top
  651.      of each page.   The top of each page is interpreted from the page
  652.      size.  
  653.  
  654.           Bottom Margin:
  655.  
  656.      The bottom margin  is the number of lines to print after the last
  657.      record to complete  the page size.   It is not necessary  for the
  658.      user  to calculate exactly  the bottom margin.   If a record will
  659.  
  660.                                      10
  661.  
  662.  
  663.  
  664.      fit into the bottom margin without exceeding the page size speci-
  665.      fied, it will be printed in the bottom margin.  
  666.           Left Margin:
  667.  
  668.      The left margin  is the number of characters to move to the right
  669.      from the left edge of the paper.
  670.  
  671.           Spacing:
  672.  
  673.      Spacing is the number of lines to  print between each record.  It
  674.      controls whether output is single spaced, double spaced, etc.
  675.  
  676.           Number of Columns:
  677.  
  678.      The number of columns is simply the number of columns to print on
  679.      each page.  If the user specifies more columns  than can fit on a
  680.      page, the program does know it but produces the illegible output.
  681.      Therefore, the user should try to take into account how wide each
  682.      column  will print.   The  widest field possible  is 36,  but the
  683.      widest  field printed may be  less than this.   If a  field is 36
  684.      characters long, it would not make sense to try and print  3 col-
  685.      umns on 8.5 X 11  inch paper since 3 * 36 = 108  (only 85 charac-
  686.      ters can fit on 8.5 inch wide paper).  
  687.  
  688.           Column Width:
  689.  
  690.      Column width will be suggested by the program to give equal width
  691.      columns.  The formula used is (80-LM)/Cols, where  LM is the left
  692.      margin and Cols is the number of columns.   The reason 80 is used
  693.      instead of 85  is to reserve about  5 spaces for a  right margin.
  694.      The value can  be set  to anything  the user desires.   CIM  uses
  695.      column width to know how far to move over to the next column.  If
  696.      column width is less than the width of the field, no  spaces will
  697.      separate one column from the next.
  698.  
  699.           Skip printing blank fields (y/n/p)?:
  700.  
  701.      When printing  output, it usually  is desirable to  skip printing
  702.      blank fields.   For example,  if some records  have title  fields
  703.      with  information but others  without information, one  would not
  704.      want the first and last name printed followed by a blank line and
  705.      then by  the business  or address  when printing  mailing labels.
  706.      Responding Y to  this option causes  blank fields to be  skipped.
  707.      The blank lines are  pushed to follow the record to  maintain the
  708.      same  number of  lines  for every  record.   The Y  response also
  709.      causes any literals  following a blank field to  be skipped.  For
  710.      example, consider printing a list with last name, first name.  If
  711.      the last  name were missing, it would not  be desirable to have a
  712.      comma printed  before the  first name  (i.e, ,Smith).   In  cases
  713.      where you want  to skip blank  fields but not literals  following
  714.      blank  fields, respond  with P.   P also  causes CIM  to consider
  715.      lines with only  literals printed  as non-blank lines  while a  Y
  716.      causes CIM to consider lines with  only literals printed as blank
  717.      lines.  This may be an important consideration when utilizing the
  718.      tab function.  Responding N would cause blank fields to be print-
  719.      ed in the same sequence as the code specifies. 
  720.  
  721.           Code:
  722.  
  723.      The code is the heart of specifying output.  The first  letter of
  724.      every field, capitalized, is a code to print that field.  The box
  725.  
  726.                                      11
  727.  
  728.  
  729.  
  730.      at the left  of the Process menu  field lists the codes  for easy
  731.      reference.  Do  not think about multiple  columns when specifying
  732.      the code.   Think  of single  column output.   The backslash  (\)
  733.      character codes for a carriage return.  Therefore, FL\P codes for
  734.      printing the first name last name and the phone on the next line.
  735.      The  tilde (~) codes  for numbering the records.   Numbers do not
  736.      start over for each page but  continue numbering upward by incre-
  737.      ments of 1 until  there are no more  records to print.   The back
  738.      apostrophe, `, codes  for a tab at that specified location.  Tabs
  739.      are set by pressing T when not in manual entry mode.  Any charac-
  740.      ter other than  the codes listed  are printed as literals,  i.e.,
  741.      exactly as they appear.  The case of the letters matters  so that
  742.      A causes the address field to print, but a causes the letter a to
  743.      print.  
  744.  
  745.      To print notes, specify where you want  each line of the notes by
  746.      entering its decimal ASCII  code equivalent.  Do this  by holding
  747.      the Alt key down and pressing number 1 on the numeric key pad for
  748.      note line 1,  number 2 on  the numeric key  pad for note line  2,
  749.      etc.  The ASCII codes 1, 2, 3, or 4 will be displayed in the Code
  750.      field, i.e.,  ,   ,  ,    represent  note lines  1, 2,  3, and  4
  751.      respectively.
  752.  
  753.      The format of  the reports is up to  your imagination.  Following
  754.      are some examples of codes and the output they might produce:
  755.  
  756.           Code:            Output:                Comments:
  757.  
  758.           F L\P            John Doe                \ = carriage return
  759.                            999-9999
  760.  
  761.           ~. L, F P        1. Doe, John 999-9999   ~ = number
  762.  
  763.           F`P              John Doe.....999-9999   ` = tab stop 
  764.        
  765.           L, F P\A         Doe, John 999-9999
  766.                            1122 Buger Buger Ave.
  767.  
  768.        F L\T\B\A\C, S Z    John Doe
  769.                            General Manager
  770.                            John's Hot Dog Stand
  771.                            1122 Burger Burger Ave.
  772.                            Anywhere, ST 33333
  773.  
  774.      If settings are set for a particular use that is going to be used
  775.      more than once,  you may save the settings in a file by using the
  776.      S option.  Remember the file name you save it  as so that you can
  777.      retrieve  the settings using the G option.   You probably want to
  778.      give the files a common extension, such as .SET, so that you will
  779.      know later what kind of files they are.
  780.  
  781.      T sets up  to five tab  stops each with  its own fill  character.
  782.      More than five tab markers may be used.  Every tab mark after the
  783.      fifth one uses tab setting five for its tab stop and fill charac-
  784.      ter; hence, tabs can be used for indenting text.
  785.  
  786.      R will start processing the data for  output.  It is often a good
  787.      idea to send output to the terminal  in order to review it before
  788.      printing.  Output  sent to  the screen skips  writing the  bottom
  789.      margin to allow viewing of as much data as possible; however, the
  790.      top margin is written but may scroll off the top of the screen as
  791.  
  792.                                      12
  793.  
  794.  
  795.  
  796.      more data is written  to the screen.  When sending  output to the
  797.      terminal, CIM will pause after processing  each page to allow the
  798.      user the option of going back to the menu.  After  sending output
  799.      to the screen, the  settings remain the same  upon return to  the
  800.      process file menu.   Therefore, the O  option may be used  to set
  801.      destination of output to the printer, and then  R may be selected
  802.      to start processing the file again.  
  803.  
  804.  
  805.                                  Utilities
  806.  
  807.      Most of the utilities are meant to make manipulation  of the data
  808.      in CIM easy.  CIM allows editing capabilities, but global changes
  809.      often make  editing tasks easier.   Some of the  more common ways
  810.      utilities can help are as follows:
  811.  
  812.           1.   Change qualifier codes  of a particular character  to a
  813.                different character throughout the file.
  814.  
  815.           2.   Marking or unmarking  all qualifiers of records  with a
  816.                particular  string match, such  as those with  the same
  817.                business or those with the same zip code.
  818.  
  819.           3.   Changing a string, such as a zip code or business name,
  820.                to a different one.
  821.  
  822.           4.   Deleting a string from the file.
  823.  
  824.           5.   Inserting or appending printer codes to cause underline
  825.                or bold printing of a field.
  826.  
  827.           6.   Reindexing a notes  file.  This  may be necessary if  a
  828.                file was exported as  an ASCII file for editing  with a
  829.                text editor and later imported.   It may also be neces-
  830.                sary  if a  notes  file became  unindexed  due to  file
  831.                corruption or temporary separation from  the main file.
  832.  
  833.  
  834.           7.   Deleting trailing  spaces on  all fields  in the  file,
  835.                except for the qualifier field.
  836.  
  837.           8.   Browsing of  the notes  file  to facilitate  reindexing
  838.                procedures of a corrupted file. 
  839.  
  840.           9.   Saving a  file  called PROFILE.CIM  which contains  the
  841.                default values for CIM.  Simply set parameters, such as
  842.                your most  used working file,  destination for  output,
  843.                qualifier marker character,  search options, or process
  844.                menu options, and  then select the  last option of  the
  845.                utilities menu to save all these settings to disk.  
  846.  
  847.      Most of  the utilities are very easy to use.  Press U at the main
  848.      menu to  bring  up the  utilities menu.   Select  C  to change  a
  849.      string.   You will first be asked  for the field in which to find
  850.      the match.  You may select  every field or just one field.   Next
  851.      you  will be asked for the string to find and then for the string
  852.      to  replace.  CIM  will only change  the first occurrence  of the
  853.      string.  This allows greater control in making global changes but
  854.      necessitates processing the file several times if there are known
  855.      to be multiple occurrences of the string.  Strings may be deleted
  856.      by leaving the replacement string blank.
  857.  
  858.                                      13
  859.  
  860.  
  861.  
  862.  
  863.      The I)nsert string  and A)ppend string options  allow inserting a
  864.      string at the beginning of a field, or appending a string  at the
  865.      end of the field.  This may be desirable for placement of printer
  866.      codes.    For example,  if one  wants  a listing  with businesses
  867.      underlined, he could first process  the file, inserting a printer
  868.      code to turn on underlining, and appending a printer code to turn
  869.      off underlining.  One  should be careful that room  exists in the
  870.      field for adding the characters.
  871.  
  872.      The M)ark and U)nmark options allow marking or unmarking qualifi-
  873.      ers based upon a matching string.  For example, I could  mark all
  874.      entries with the same zip code or  the same business.  M)ark also
  875.      allows marking a qualifier based upon duplicate fields.  The file
  876.      must be sorted by the desired field for this option to work.  For
  877.      example, I may want  to print a listing of all  entries that have
  878.      the same address because I suspect I have multiple mailings going
  879.      out.  I would first sort the  file by address, and then go to the
  880.      utilities menu and  select K to enter  the marker I want  to use.
  881.      Next, I  would select  M for M)ark  qualifiers.  The  next screen
  882.      asks if I want to find a matching  string or duplicate fields.  I
  883.      would select duplicate fields.   Then I would press Y  to process
  884.      the file.   Every field that has the same address would be marked
  885.      with a qualifier and I could then go to the Process file menu and
  886.      print those records.  After  that, I could go into  browsing mode
  887.      and delete those  entries I don't want left on the mailing.  Then
  888.      I would go to utilities and remove all the qualifier marks at one
  889.      time through either C)hange string or U)nmark qualifiers.  
  890.  
  891.      Marking duplicate addresses would only work if the addresses were
  892.      truly identical so  it is a good  idea to be consistent  with the
  893.      way addresses are entered.  Decide on a convention for specifying
  894.      suite and apartment numbers and abbreviations for street, avenue,
  895.      drive, etc., and stick to the convention.
  896.  
  897.      The N)otes file utilities contain procedures that most users will
  898.      probably not use.  Primarily, they are tools to fix problems that
  899.      might arise with the notes file  if it becomes separated from the
  900.      main  file,  or if  disk corruption  destroys  the indexing.   To
  901.      understand the  utilities, one must understand how  the files are
  902.      indexed.
  903.  
  904.      The main  file contains an integer  that is the record  number of
  905.      the notes file  (the first note record  is record 0).   The notes
  906.      file, likewise, contains an integer which is the record number of
  907.      the main file.  Since people normally count from one, the  record
  908.      number is reported to the user in browsing mode as 1 greater than
  909.      the actual record number.  
  910.  
  911.      The Main to Notes indexing option considers the main file to have
  912.      accurate indices.  It reads the main file, finds the  note record
  913.      pointed to by  each record,  changes the note  record to  reflect
  914.      that record in the main file, and continues on to the next record
  915.      in the  main file.   If a record in  the main file  is marked for
  916.      deletion, the note file it points to  will also become marked for
  917.      deletion.   
  918.      The Notes to Main indexing option considers the notes file to  be
  919.      properly indexed.   It  reads the  notes file,  finds the  record
  920.      pointed to in the main file, changes the main file record pointer
  921.      to point  back to the note record last  read, and continues on to
  922.      the  next record in the notes  file.  If a  note points to a non-
  923.  
  924.                                      14
  925.  
  926.  
  927.  
  928.      existent record  in the main  file, the note is  marked for dele-
  929.      tion.   Choosing the  compress notes  file option  deletes marked
  930.      notes from the file.
  931.  
  932.      The R)einitialize option  simply reinitializes the main  file in-
  933.      dices to zero so that the main file effectively has no notes.  It
  934.      may be desirable  to do this  before choosing the  Notes to  Main
  935.      indexing option but never  before the Main to Notes  indexing op-
  936.      tion.
  937.  
  938.      The D)elete trailing  spaces option allows processing  the entire
  939.      file  at one time to eliminate  all trailing spaces on all fields
  940.      except for the qualifier  field.  This  may be necessary if  care
  941.      was not taken  when inputing fields  to not add trailing  spaces.
  942.      Trailing spaces sometimes interfere with printing output.
  943.  
  944.      The B)rowse notes file option  allows the user to view each  note
  945.      and see  which customer  record  it is  indexed to.   The  record
  946.      number reported  is the same  as that seen  in Browsing mode  and
  947.      used for record  number searches.   The literal record number  in
  948.      the file  is 1  less than  that which  is reported.   The  record
  949.      number reported for the  notes record is the true  record number,
  950.      starting from 0.  C.I is  the index number found in the  customer
  951.      file, i.e., it  specifies which note record to  retrieve.  N.I is
  952.      the index number found in the note file, i.e., it specifies which
  953.      customer record to retrieve when notes are searched for a string.
  954.      The index may  be a negative number  if the record is  marked for
  955.      deletion.   Add 5000  to the index  number to  determine the true
  956.      record number.  
  957.  
  958.      Selecting  O)ther Colors  allows  changing  the  colors.    After
  959.      selecting  the  colors  you prefer,  select  the  option  to save
  960.      PROFILE.CIM  so that  the new  colors will  be set  automatically
  961.      everytime you use CIM. 
  962.  
  963.  
  964.                              Technical Comments
  965.  
  966.      As with most programs, there are certain restrictions.  Sorts are
  967.      performed in memory, but if more memory is needed, disk  space is
  968.      used  as an extension of memory.  Provided you have enough memory
  969.      and disk  space, over 32,000 records may be  sorted.  I doubt you
  970.      need more, but if you do, contact me for a version that will sort
  971.      over 2 billion records.
  972.  
  973.      When processing a file for output,  records are taken into memory
  974.      for each page.  If the  skip blanks option is activated, no  more
  975.      than 30 columns can be printed (but who needs more?).  Regardless
  976.      of options  selected, a  maximum of  216 records  can be  printed
  977.      within a specified page size.  Its hard for me to imagine someone
  978.      needing to print  this many  records on a  single page  (normally
  979.      less than 60 records are printed on  a single page), but if it is
  980.      necessary, it may be accomplished by making the page size smaller
  981.      and using the  spacing variable  and backslashes in  the code  to
  982.      provide  proper  vertical spacing  on  the page.    When printing
  983.      sorted files, the page size should  be set to the same number  of
  984.      lines as  in one  record plus spacing  so that  the page  will be
  985.      sorted across columns. 
  986.  
  987.  
  988.  
  989.  
  990.                                      15
  991.  
  992.  
  993.  
  994.      If you write in Turbo Pascal and  want to write your own routines
  995.      to access the files, here are the file definitions:
  996.  
  997.      Each record in the main file is defined as:
  998.      Type
  999.          CustomerRecord = RECORD
  1000.               LastName  : String[13];
  1001.               FirstName : String[20];
  1002.               Title     : String[30];
  1003.               Business  : String[36];
  1004.               Address   : String[36];
  1005.               City      : String[19];
  1006.               State     : String[2];
  1007.               Zip       : String[10];
  1008.               Phone     : String[31];
  1009.               Qualifier : String[10];
  1010.               NRec      : Integer;
  1011.          End;
  1012.  
  1013.      Each record in the notes file is defined as:
  1014.      Type
  1015.          NoteLine = String[40];
  1016.          NotesRecord = Record
  1017.                 CRec : Integer;
  1018.                Note1 : NoteLine;
  1019.                Note2 : NoteLine;
  1020.                Note3 : NoteLine;
  1021.                Note4 : NoteLine;
  1022.            End;
  1023.  
  1024.      Future upgrade ideas I have are:
  1025.  
  1026.           1.   B+ tree  access to  last names  and zip  codes so  that
  1027.                sorting would be unnecessary when printing or accessing
  1028.                reports by  these fields.   Also, access  by last  name
  1029.                would be lightning fast.
  1030.  
  1031.           2.   Fast Pop-up menus.
  1032.  
  1033.           3.   Customized printer drivers  for entering printer  codes
  1034.                using function keys.
  1035.  
  1036.      For the latest update, whether in  public domain or not, register
  1037.      by sending a contribution and suggestions to:
  1038.  
  1039.                               David E. Miller
  1040.                              8207 Collier Place
  1041.                               Tampa, FL  33637
  1042.                                 813-985-4444
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.                                      16
  1057.  
  1058.