This is a user-supported program. If you find this program of value, please register. Report any Problems to: David E. Miller 8207 Collier Place Tampa, FL 33637 813-985-4444 C. I. M. Contact Information Manager Version 3.5 November 9, 1988 CIM is a data base manager for information used to contact people or businesses. In other words, it stores, retrieves, and prints addresses and phone numbers. Several of CIM's features are: A. Mailing labels of any type may be printed, as well as rolodex cards or custom reports on plain paper. B. Output can be specifically controlled: which fields, the sequence of fields, as well as where to print them can be specified. Also, the number of columns can be specified. Page size and margins are all under the user's control. C. Records can be sorted by name, zip code, or any field. D. Notes can be added to records. E. Over 32,000 records per file can be managed using all features of CIM. If you need more records per file, contact me. I can supply you with a version that will handle over 2 billion records! F. Allows handling any number of separate files. G. Output can be directed to screen, printer, or disk. H. Search capability for every field as well as for notes. I. ASCII files may be imported. Files from dBASE III can be converted in a simple two step process. J. Easy to use through the use of menus. CIM is being distributed under the Shareware concept. This means you can use the program all you want absolutely free. If you find the program beneficial, please consider sending a contribu- tion to its creator. The contribution should reflect either how much you value the program, or your current economic position, whichever is lower. Full registration is $20, but $10 or less will register your current copy. All contributors are registered with the contribution amount recorded. Full registration pro- vides support and updates. Any kind of registration provokes me to continue supplying updates to the public domain and to write other quality programs for the public domain. If you enjoy the 1 benefits of public domain programs, please support the system by sending a contribution. CIM may be copied and distributed freely by anyone. All I ask is that this documentation accompany every copy unaltered. You may even sell this program and make a profit yourself as long as you include this documentation and do not charge more than $3. To register, send your name, mailing address, and phone number to: David E. Miller 8207 Collier Place Tampa, FL 33637 813-985-4444 The source code is available upon request to any user sending a contribution of $25 or more. The source code is written in Turbo Pascal 4.0 and may be modified in any way the user desires. System Overview Previous versions (2.6 and earlier) of CIM were distributed as CIM.COM with a memory overlay file, CIM.000. Now, because of the purchase of a new Turbo Pascal 4.0 compiler, CIM is CIM.EXE. The program is larger like this, but there is no need for memory overlay files. The entire program resides in memory. CIM.EXE will automatically determine whatever type of monitor and monitor card you have (Monochrome, CGA, EGA, VGA, etc.) and behave appropriately. CIM manages ten fields for each record. The ten fields are: First Name, Last Name, Title, Business, Address, City, State, Zip, Phone, and Qualifier. Records can be sorted by any of these fields and output can be specified with any combination of these fields. The records utilize the same amount of disk space re- gardless of how much information is typed into each field. CIM allows adding notes to records. In order to conserve disk space, notes are kept in a separate note file which is indexed to the data file. The note file is given the same name as the main file except that the extension is changed to NTS. To exit most screens, including CIM itself, press Esc or F1. F1 has a partial exiting function at some screens, that is, it will allow you to save whatever you are working on at the time. Esc should always abort whatever procedure you are doing, unless you are in a field which allows entering the Escape character for printer control, such as the Code field on the Report Generator menu. F1 will not exit the program at the main menu but Esc will. In most cases (maybe all cases, I can't remember), all the function keys will act as F1, so if you prefer F10, for example, try using it. Esc may allow stopping some processes as well, such as searching through the file. To start CIM, have CIM.EXE in the default drive and enter CIM at the DOS prompt. The main menu will appear. If PROFILE.CIM is 2 not on the default drive, a message will appear before the main menu informing you of this. You may create the file by going di- rectly to the Utilities menu and entering S. The Main Menu The top line shows the file to be used for most operations. You may change the name of the file by pressing F. Drive and path specifications may be placed in the file name. Many selections from the main menu act upon a file. Instead of asking you for a file name, the file at the top of the menu is the file used. I suggest using the extension .DAT (or .DTA) on your file name to make it easily distinguishable from the note file, which has the extension .NTS. The extension you use can be selected at the Utilities menu. Save the profile after selecting an extension. Once the extension has been set here, you need only enter the main name when changing the file name, e.g., CIM will become CIM.DAT. The second line shows where most output will be sent. Press O to set the destination of output to terminal, printer, or disk. The printer port you use may be set at the utilities menu. Save the profile if you change it and want it to remain changed everytime you use CIM. The output setting does not affect some options because some options, such as C)ombine or split file, must send output to disk. In such cases, you will be allowed to set the output file name from the particular option selected. Some menu options allow toggling settings, i.e., switching bet- ween on and off conditions. In such cases, the displayed setting is the current setting to be performed. For example, if you are setting a search option for case sensitive searches, and the screen displays C)ase not sensitive, pressing C will change the setting to case sensitive, and the display will become: C)ase sensitive, meaning a search for Sue will not stop at sue. Free disk space is required when sorting or compressing a file. Therefore, always be sure there is as much free disk space as the size of the current data file. If there is insufficient disk space when doing either of these procedures, you may be allowed to continue the procedure if you have another drive with free disk space, enough for the size of the file you are sorting or compressing. The use of a ram disk is highly recommended for those who do not have hard disks. Batch files are useful for copying the data files to the ram drive and logging on that drive. Creating a file There are four ways to create a CIM file: 1) select A at the main menu to enter records from the keyboard, 2) select I at the main menu to import an ASCII file, 3) select C at the main menu to create a new file from records contained in an existing CIM file, or 4) use the separate program CONVERT.COM if you used a former program of mine called Personal Roladex (spelled with an 'a'), and you want to convert your roladex files to CIM files. 3 A)dd entries or create new file If a file does not exist when selecting this option, you will be asked if you want to create the file. Respond with Y and a screen will appear displaying the ten fields that comprise a single record. Most fields are self explanatory (First Name, Last Name, Title, etc.). Keep in mind that not all fields have to be printed. Therefore, you can enter titles for some and not for others. The decision of what information to print can be made later, not now. The last field is a qualifier field which is used to qualify a record for inclusion or exclusion when processing records for output to terminal, printer, or disk. The Qualifier field is likely to be explained easiest by example. I regularly print a Phone list and an Address list and use a coding system to manage this list. For example, all records with a phone number are assigned a P in the qualifier field (other qualifier characters may also be present). All records with an address are assigned an A. All records with both a phone and an address are assigned a PA in the qualifier field. I frequently do not want records on my current list, but I don't want to delete them from the file; therefore, I code an L for those names I want on my current list. I maintain order in the characters such that a record to appear on my phone list and address list would have the qualifier code PLA. When processing the phone list, I specify PL, and when processing the address list I speci- fy LA. This restricts output to only those records I want. This way I do not get a record of a person on my phone list for whom I do not have a phone number, and I do not get a record of a person on my address list for whom I do not have an address. When entering information in the fields, standard editing keys are allowed as follows: Cursor keys move left or right one character Home moves to first character of field End moves to last character of field Ins toggles insert mode on or off Del deletes character above the cursor Backspace deletes character to left of cursor Ctrl-End erases characters from cursor to end of line Ctrl-cursor moves left or right one word (to next space) The up arrow will go to the previous field. The down arrow will go to the next field. Esc will abort the editing and return you to the main menu. F1 will skip all fields and go to the last prompt allowing you to save or not save the record. F4 will toggle whether or not the field will be cleared for the next record. When F4 is pressed, the name of the field changes color (default=red) to indicate that the field will not be cleared. This saves typing when a field has a common value for many consecutive records: for example, when consecutive records have the same place of business, or the same city, or the same qualifier. Entry on a field is considered completed when the carriage return 4 key is pressed. Entering Y or the carriage return (Enter Key) to the last prompt saves the information to disk and allows you to continue entering new names. When you are finished entering information, press Esc to return to the main menu. This may be pressed at any field. Any infor- mation present in any of the fields is not written to the file when Esc is pressed. It is a good idea to not add spaces at the end of fields. The computer recognizes spaces like any other character, and when printing output, you may cause those spaces to print into the next field or column being printed. If a number of fields have trailing spaces, the utilities menu has an option to get rid of all trailing spaces in the file. I)mport ASCII file Before selecting this option, one should select the A option described above even if he is not going to keep the file created. Doing so will allow the user to become familiar with the fields present in CIM before trying to import information into these fields. When selecting I from the main menu, a short menu appears and the cursor will be placed in a position to enter a file name. Enter here the file name of the ASCII file to import. The file name entered here will only be read, and a new file will be created with the name of the main file indicated at the top of the main menu. If the main file already exists, you will be given the option to overwrite or append to that file. Most word processing and data base files cannot be imported di- rectly but must be converted to an ASCII file first, which most word processors and data bases are capable of doing. After entering the file name, you will be asked if you want to change any of the default values of the parameters. The default values are set properly for an Export ASCII file option to be discussed later under Processing Data for Output. Answering Y allows specifying how the program should expect the information in the ASCII file to look. The top line has the sequence of the fields to expect; each field is abbreviated by the first letter of that field. I will explain the setting of these values by using an example of converting a dBASE III file to a CIM file. Consider a dBASE III file named ADDRESS.DBF. To make an ASCII file from ADDRESS.DBF, we would enter USE ADDRESS to retrieve the dBASE file, and we would enter COPY TO ADDRESS.TXT DELIMITED to create the ASCII file. We would then exit dBASE III with the QUIT command and enter CIM from DOS. Upon selecting I)mport ASCII file, we would enter ADDRESS.TXT for the file name to import, and respond with Y to change the parameters. ADDRESS.TXT has the following variables in the following order: Last Name, First Name, Title, Company, Street, City, State, Zip, Home Phone, Work Phone, membership type, and committee. Since the sequence here is different than the default, we could enter the following code for the proper sequence: LFTBACSZP w: PQQ. This sequence tells CIM to read the first field as the last name, the second 5 field as the first name, etc. Notice we used B for company and A for street because these fields are called Business and Address in CIM. Also notice we had both P and Q twice. Whenever CIM encounters another field code of the same type, it concatenates the fields together to form one field. Therefore, the home and work phone numbers are concatenated together to form one phone number field. You've probably already wondered why we entered a space and w: between the two P's in the sequence code. Anything other than the ten letters F L T B A C S Z P or Q are treated as literals. When encountering a literal, CIM looks back to the last non-literal code and concatenates the literal to the end of that field. The reason for entering w: and the spaces, there- fore, was to distinguish the home and work phones in CIM. For example, a home phone of 999-9999 and a work phone of 888-8888 would appear as 999-9999 w: 888-8888 in the CIM phone field if the above sequence code was used. The last two Q's simply trans- fer the codes used in dBASE for membership type and committee to the single qualifier field of CIM. Upon pressing the return key, the delimiter may now be entered. The default delimiter is the carriage return. Although it looks like a space, the ASCII code 13 is displayed to the right. Generally, one should press the key used for the delimiter of fields in the ASCII file; however, almost any ASCII code can be entered by holding the Alt key and entering the decimal ASCII code from the numeric key pad. ADDRESS.TXT has commas as delimi- ters, so a comma should be pressed. ADDRESS.TXT also has string fields enclosed in quotes so respond Y to the next line. This tells CIM to ignore commas within quotes (i.e., double quotes: "). We've already entered the file name to import so we can just press return at the last line. If everything looks ok, we would respond N to the prompt asking if we want to change any parame- ters and CIM goes to work importing the ASCII file. A new file is created with the name of the main file listed at the first line of the CIM main menu. C)ombine or Split file This option of the main menu allows either combining two CIM data base files, or splitting a single file into one or more separate files based upon qualifier information. Obviously, this option can only be used to create a file from an already existing file. Upon selecting C, the Combine/Split file menu appears. Before selecting R)un, the options must be set. Press S to enter a secondary file name. This secondary file will be appended to the main file if the process desired is combine file. If the process desired is split file, the secondary file will be created. Pressing Q allows entering a qualifier code. Pressing F toggles for processing a match with the specified qualifier, or process- ing a everything but matches with the qualifier, i.e., a non- match, or greater than or less than comparisons may also be done. The displayed setting is the setting to be performed. Toggle the process, combine or split, by pressing P. The process displayed is the process that will be performed; therefore, if the process says Split file, pressing P will set the option to Combine file, and when R is pressed, the secondary file will be appended to the main file. When all settings are correct, press R to make CIM go to work. 6 CONVERT.COM The convert program will convert Roladex files, data files created by ROLADEX.COM, to CIM files. If you have not used the Personal Roladex program, CONVERT.COM is not useful to you. I have noticed another program named Rolodex. CONVERT.COM will only convert Roladex files (spelled with an a) not Rolodex files. The Roladex program had a main menu somewhat similar to CIM. If your old program does not have a similar screen, you probably have a different program than the one I wrote, and CONVERT.COM will not work for you. To use CONVERT.COM, simply have CONVERT.COM in the default drive and enter CONVERT at the DOS prompt. You will be prompted for the Roladex file name to read and the new file to create. Viewing the file After you have created a file, it is likely you will want to look at it. The simplest way to do this is press B from the main menu. You are immediately place at the first record of the file. Two other methods exist to enter browsing mode. Pressing E will place you immediately at the end of the file. Pressing L will allow you to enter a search string or a record number to find. All of these methods, B E or L, put you in browsing mode for viewing the file. L)ook for string Upon entering L from the main menu, you will be prompted for a search string. Enter any string of characters that would match anything in the record. It could be a last name like Smith, or a zip code like 33609. If you want to go directly to a specific record, enter the record number to find. If you change your mind and want to return to the main menu, press F1. If you want to continue and search for the string you entered, press the return key. After you press the return key, you will be asked if you want to perform a standard forward search, a quick binary search for last name, or a record number search. If you choose to perform a record number search, CIM will find the number entered for a search string. If you entered a string or nothing at all, CIM will ask you for a record number. If you select standard forward search, CIM will begin looking for a matching string in the file starting at the beginning of the file. The search options in effect (case sensitive search, match or none match, etc.) will be either those set during the current session, or the default values set in PROFILE.CIM. The quick binary search is a specialized searched that performs properly only under certain conditions. The quick binary search can only be performed when looking for a last name in a file that is sorted by last name. In such situations, it is very fast, letting you know quickly if the last name is missing. Further- more, if the search string is not found, CIM places you at the location in the file where that record should have been. The search is case sensitive so the search string must have the 7 proper case. Entering smith as a search string will not find Smith in the file when using a quick binary search. However, a standard forward search will find such a record if the search options are set to case not sensitive. Browsing Mode Information displayed in Browsing Mode Options B, E, and L place you in browsing mode. In browsing mode, the very top line displays special messages, such as error messages, if any. The next line displays the search string. The actual record is displayed next. Below the record, two numbers are displayed in parentheses. The first number is the number of the displayed record, i.e., its relative position in the file. The second number is the total number of records in the file. Lastly, all the options available while in browsing mode are dis- played. Available Options in Browsing Mode Press F to move forward or B to move backward through the file. Press C to change the search string displayed at the top of the screen. If you change your mind about the new search string, press Esc or F1 to abort the change and return the search string to its previous setting. Press Q to put you in editing mode (described later) and place you at the qualifier field. This allows quick editing of the frequently changed qualifier field. Press S to begin searching for the string displayed at the top of the screen. You will given several search alternatives: F) to search forward from your current position in the file, B) to search backward from your current position in the file, Q) to do a quick binary search for last name which requires the file to be sorted by last name (see discussion above), N) to search the notes file, or O) to set the search options. Search options allow: 1) making searches case sensitive, 2) making searches look for non-matches instead of matches or for greater than or less than strings, and 3) making searches only look at qualifier codes or all fields except the qualifier code. The search options display the current settings and can be changed by pressing the highlighted letter. The default settings are made by setting the values to those desired for default settings and going to the utilities menu to save PROFILE.CIM. You go directly to a specific record by pressing R, or edit the record by pressing E. In editing mode, Esc will abort the edit and return you to browse mode. You may skip fields and go to the last prompt by pressing a function key. For example, suppose you were changing a last name. After changing the name, press F1, and then press Y or the carriage return to save the change. Press D to delete the displayed record. You will be asked if you want to mark the record for deletion. Responding Y will mark the record for deletion. Pressing D again allows undeleting the record. The record will not be removed from the file until the file is compressed later. Records may be undeleted unless the 8 file is compressed. After compression, the record is eliminated forever. Records marked for deletion, while still in the file, are not processed when printing reports. When exiting browsing mode, you will be asked if you want to compress the file and eliminate records marked for deletion. Since it may take several minutes for large files, you may not want to compress the file every time records are marked for deletion. If you have records marked for deletion from previous sessions and want to compress the file without deleting any addi- tional records, undelete a record and then delete it again. When exiting browsing mode you will be prompted for compressing the file. Press P to print the displayed record on an envelope. A second screen will appear allowing you to change the return address, to print both the return address and the mailing address, or to print only the mailing address of the record. Your name and address can be the default name and address by changing the return address here and then going to the utilities menu to save PROFILE.CIM. Press M to insert a qualifier code without going into edit mode. The default marker is *, but it may be changed to any character by pressing K. When asked to press the key to use, press the key you want to use as a marker, or hold the Alt key and key in the ASCII decimal value on the numeric key pad. To unmark a qualifi- er code without going into edit mode, press U. This system of marking was made to allow easy coding of records for printing output. Press N to add, edit, or view a record's note. Report Generator Menu Selecting R, P, or carriage return from the main menu brings you to the forte of CIM. You should be very pleased with the ability of CIM to produce the kind of output you want. The process file menu displays a box on the left part of the screen which contains codes for specifying output, and a double lined box on the right side which is divided into upper and lower halves. The upper box lists options that may be entered from the keyboard, the lower half displays settings that determine how the output will appear when the file is processed. The top two lines of the upper box simply allow changing the file to process and the destination of output. These options can also be changed at the main menu as discussed previously. The next set of lines display various options. Pressing P sets all values displayed at the bottom of the screen to settings for printing a typical two column phone list. Pressing A sets all values for printing an address list. Pressing C sets all values for print- ing rolodex style cards. Pressing L sets all values for process- ing one column mailing labels. Pressing E sets values for writ- ing all values to an ASCII file that is carriage return delimit- ed. Settings may be manually set anyway the user desires by pressing M or the carriage return key. The changed settings may then be saved on disk by pressing S and entering a file name (I suggest using extension .SET but other extensions are allowed), 9 and retrieved from disk by pressing G and entering the appropri- ate file name. Pressing Q toggles the setting for finding match- ing qualifier codes in the file, or for finding non-matching qualifier codes when processing for output. Pressing R begins processing the file using the settings displayed. Pressing Esc allows exiting the process file menu and returning to the main menu. Manually setting values There are almost no error traps for the settings of output val- ues. This is done to allow complete freedom to the user for producing output. However, this means the user can provide settings that cause CIM to produce illegible or no output. To enter your own settings, press M, the carriage return, or the down arrow to move the cursor to the first line of the lower box, the qualifier line. Pressing the up arrow will start you at the last field, the Code Field. At the first line, enter the quali- fier to match or non-match, depending on the setting displayed next to qualifier at the upper right side of the screen. If this is the only setting you want to change, press Esc or a function key to return to the upper box. To continue to the next line, press the down arrow or the return key; the cursor moves to the next line to allow changing the page size. If none of the other values need changing, press Esc or a function key to exit manual mode. This is permissible at any of the entries to allow the user the luxury of not having to page down through each entry. Page Size: Page size is the number of lines on a page. Normally, there are 66 lines per page; however, printers may be changed to print more or less lines per page, or pages may be longer or shorter. Page size could be specified to a size smaller than the page to con- trol how alphabetizing occurs. For example, a file sorted by last name and printed in 3 columns normally would be sorted within columns on the page. To have the file sorted across columns, page size could be set to the total number of lines printed for each record plus the number of lines printed between records (Spacing). Begin with Record: This indicates the record number with which to begin processing. This is helpful if paper jams occur and you don't want to reprint the entire file. Top Margin: The top margin is simply the number of lines to print at the top of each page. The top of each page is interpreted from the page size. Bottom Margin: The bottom margin is the number of lines to print after the last record to complete the page size. It is not necessary for the user to calculate exactly the bottom margin. If a record will 10 fit into the bottom margin without exceeding the page size speci- fied, it will be printed in the bottom margin. Left Margin: The left margin is the number of characters to move to the right from the left edge of the paper. Spacing: Spacing is the number of lines to print between each record. It controls whether output is single spaced, double spaced, etc. Number of Columns: The number of columns is simply the number of columns to print on each page. If the user specifies more columns than can fit on a page, the program does know it but produces the illegible output. Therefore, the user should try to take into account how wide each column will print. The widest field possible is 36, but the widest field printed may be less than this. If a field is 36 characters long, it would not make sense to try and print 3 col- umns on 8.5 X 11 inch paper since 3 * 36 = 108 (only 85 charac- ters can fit on 8.5 inch wide paper). Column Width: Column width will be suggested by the program to give equal width columns. The formula used is (80-LM)/Cols, where LM is the left margin and Cols is the number of columns. The reason 80 is used instead of 85 is to reserve about 5 spaces for a right margin. The value can be set to anything the user desires. CIM uses column width to know how far to move over to the next column. If column width is less than the width of the field, no spaces will separate one column from the next. Skip printing blank fields (y/n/p)?: When printing output, it usually is desirable to skip printing blank fields. For example, if some records have title fields with information but others without information, one would not want the first and last name printed followed by a blank line and then by the business or address when printing mailing labels. Responding Y to this option causes blank fields to be skipped. The blank lines are pushed to follow the record to maintain the same number of lines for every record. The Y response also causes any literals following a blank field to be skipped. For example, consider printing a list with last name, first name. If the last name were missing, it would not be desirable to have a comma printed before the first name (i.e, ,Smith). In cases where you want to skip blank fields but not literals following blank fields, respond with P. P also causes CIM to consider lines with only literals printed as non-blank lines while a Y causes CIM to consider lines with only literals printed as blank lines. This may be an important consideration when utilizing the tab function. Responding N would cause blank fields to be print- ed in the same sequence as the code specifies. Code: The code is the heart of specifying output. The first letter of every field, capitalized, is a code to print that field. The box 11 at the left of the Process menu field lists the codes for easy reference. Do not think about multiple columns when specifying the code. Think of single column output. The backslash (\) character codes for a carriage return. Therefore, FL\P codes for printing the first name last name and the phone on the next line. The tilde (~) codes for numbering the records. Numbers do not start over for each page but continue numbering upward by incre- ments of 1 until there are no more records to print. The back apostrophe, `, codes for a tab at that specified location. Tabs are set by pressing T when not in manual entry mode. Any charac- ter other than the codes listed are printed as literals, i.e., exactly as they appear. The case of the letters matters so that A causes the address field to print, but a causes the letter a to print. To print notes, specify where you want each line of the notes by entering its decimal ASCII code equivalent. Do this by holding the Alt key down and pressing number 1 on the numeric key pad for note line 1, number 2 on the numeric key pad for note line 2, etc. The ASCII codes 1, 2, 3, or 4 will be displayed in the Code field, i.e., , , , represent note lines 1, 2, 3, and 4 respectively. The format of the reports is up to your imagination. Following are some examples of codes and the output they might produce: Code: Output: Comments: F L\P John Doe \ = carriage return 999-9999 ~. L, F P 1. Doe, John 999-9999 ~ = number F`P John Doe.....999-9999 ` = tab stop L, F P\A Doe, John 999-9999 1122 Buger Buger Ave. F L\T\B\A\C, S Z John Doe General Manager John's Hot Dog Stand 1122 Burger Burger Ave. Anywhere, ST 33333 If settings are set for a particular use that is going to be used more than once, you may save the settings in a file by using the S option. Remember the file name you save it as so that you can retrieve the settings using the G option. You probably want to give the files a common extension, such as .SET, so that you will know later what kind of files they are. T sets up to five tab stops each with its own fill character. More than five tab markers may be used. Every tab mark after the fifth one uses tab setting five for its tab stop and fill charac- ter; hence, tabs can be used for indenting text. R will start processing the data for output. It is often a good idea to send output to the terminal in order to review it before printing. Output sent to the screen skips writing the bottom margin to allow viewing of as much data as possible; however, the top margin is written but may scroll off the top of the screen as 12 more data is written to the screen. When sending output to the terminal, CIM will pause after processing each page to allow the user the option of going back to the menu. After sending output to the screen, the settings remain the same upon return to the process file menu. Therefore, the O option may be used to set destination of output to the printer, and then R may be selected to start processing the file again. Utilities Most of the utilities are meant to make manipulation of the data in CIM easy. CIM allows editing capabilities, but global changes often make editing tasks easier. Some of the more common ways utilities can help are as follows: 1. Change qualifier codes of a particular character to a different character throughout the file. 2. Marking or unmarking all qualifiers of records with a particular string match, such as those with the same business or those with the same zip code. 3. Changing a string, such as a zip code or business name, to a different one. 4. Deleting a string from the file. 5. Inserting or appending printer codes to cause underline or bold printing of a field. 6. Reindexing a notes file. This may be necessary if a file was exported as an ASCII file for editing with a text editor and later imported. It may also be neces- sary if a notes file became unindexed due to file corruption or temporary separation from the main file. 7. Deleting trailing spaces on all fields in the file, except for the qualifier field. 8. Browsing of the notes file to facilitate reindexing procedures of a corrupted file. 9. Saving a file called PROFILE.CIM which contains the default values for CIM. Simply set parameters, such as your most used working file, destination for output, qualifier marker character, search options, or process menu options, and then select the last option of the utilities menu to save all these settings to disk. Most of the utilities are very easy to use. Press U at the main menu to bring up the utilities menu. Select C to change a string. You will first be asked for the field in which to find the match. You may select every field or just one field. Next you will be asked for the string to find and then for the string to replace. CIM will only change the first occurrence of the string. This allows greater control in making global changes but necessitates processing the file several times if there are known to be multiple occurrences of the string. Strings may be deleted by leaving the replacement string blank. 13 The I)nsert string and A)ppend string options allow inserting a string at the beginning of a field, or appending a string at the end of the field. This may be desirable for placement of printer codes. For example, if one wants a listing with businesses underlined, he could first process the file, inserting a printer code to turn on underlining, and appending a printer code to turn off underlining. One should be careful that room exists in the field for adding the characters. The M)ark and U)nmark options allow marking or unmarking qualifi- ers based upon a matching string. For example, I could mark all entries with the same zip code or the same business. M)ark also allows marking a qualifier based upon duplicate fields. The file must be sorted by the desired field for this option to work. For example, I may want to print a listing of all entries that have the same address because I suspect I have multiple mailings going out. I would first sort the file by address, and then go to the utilities menu and select K to enter the marker I want to use. Next, I would select M for M)ark qualifiers. The next screen asks if I want to find a matching string or duplicate fields. I would select duplicate fields. Then I would press Y to process the file. Every field that has the same address would be marked with a qualifier and I could then go to the Process file menu and print those records. After that, I could go into browsing mode and delete those entries I don't want left on the mailing. Then I would go to utilities and remove all the qualifier marks at one time through either C)hange string or U)nmark qualifiers. Marking duplicate addresses would only work if the addresses were truly identical so it is a good idea to be consistent with the way addresses are entered. Decide on a convention for specifying suite and apartment numbers and abbreviations for street, avenue, drive, etc., and stick to the convention. The N)otes file utilities contain procedures that most users will probably not use. Primarily, they are tools to fix problems that might arise with the notes file if it becomes separated from the main file, or if disk corruption destroys the indexing. To understand the utilities, one must understand how the files are indexed. The main file contains an integer that is the record number of the notes file (the first note record is record 0). The notes file, likewise, contains an integer which is the record number of the main file. Since people normally count from one, the record number is reported to the user in browsing mode as 1 greater than the actual record number. The Main to Notes indexing option considers the main file to have accurate indices. It reads the main file, finds the note record pointed to by each record, changes the note record to reflect that record in the main file, and continues on to the next record in the main file. If a record in the main file is marked for deletion, the note file it points to will also become marked for deletion. The Notes to Main indexing option considers the notes file to be properly indexed. It reads the notes file, finds the record pointed to in the main file, changes the main file record pointer to point back to the note record last read, and continues on to the next record in the notes file. If a note points to a non- 14 existent record in the main file, the note is marked for dele- tion. Choosing the compress notes file option deletes marked notes from the file. The R)einitialize option simply reinitializes the main file in- dices to zero so that the main file effectively has no notes. It may be desirable to do this before choosing the Notes to Main indexing option but never before the Main to Notes indexing op- tion. The D)elete trailing spaces option allows processing the entire file at one time to eliminate all trailing spaces on all fields except for the qualifier field. This may be necessary if care was not taken when inputing fields to not add trailing spaces. Trailing spaces sometimes interfere with printing output. The B)rowse notes file option allows the user to view each note and see which customer record it is indexed to. The record number reported is the same as that seen in Browsing mode and used for record number searches. The literal record number in the file is 1 less than that which is reported. The record number reported for the notes record is the true record number, starting from 0. C.I is the index number found in the customer file, i.e., it specifies which note record to retrieve. N.I is the index number found in the note file, i.e., it specifies which customer record to retrieve when notes are searched for a string. The index may be a negative number if the record is marked for deletion. Add 5000 to the index number to determine the true record number. Selecting O)ther Colors allows changing the colors. After selecting the colors you prefer, select the option to save PROFILE.CIM so that the new colors will be set automatically everytime you use CIM. Technical Comments As with most programs, there are certain restrictions. Sorts are performed in memory, but if more memory is needed, disk space is used as an extension of memory. Provided you have enough memory and disk space, over 32,000 records may be sorted. I doubt you need more, but if you do, contact me for a version that will sort over 2 billion records. When processing a file for output, records are taken into memory for each page. If the skip blanks option is activated, no more than 30 columns can be printed (but who needs more?). Regardless of options selected, a maximum of 216 records can be printed within a specified page size. Its hard for me to imagine someone needing to print this many records on a single page (normally less than 60 records are printed on a single page), but if it is necessary, it may be accomplished by making the page size smaller and using the spacing variable and backslashes in the code to provide proper vertical spacing on the page. When printing sorted files, the page size should be set to the same number of lines as in one record plus spacing so that the page will be sorted across columns. 15 If you write in Turbo Pascal and want to write your own routines to access the files, here are the file definitions: Each record in the main file is defined as: Type CustomerRecord = RECORD LastName : String[13]; FirstName : String[20]; Title : String[30]; Business : String[36]; Address : String[36]; City : String[19]; State : String[2]; Zip : String[10]; Phone : String[31]; Qualifier : String[10]; NRec : Integer; End; Each record in the notes file is defined as: Type NoteLine = String[40]; NotesRecord = Record CRec : Integer; Note1 : NoteLine; Note2 : NoteLine; Note3 : NoteLine; Note4 : NoteLine; End; Future upgrade ideas I have are: 1. B+ tree access to last names and zip codes so that sorting would be unnecessary when printing or accessing reports by these fields. Also, access by last name would be lightning fast. 2. Fast Pop-up menus. 3. Customized printer drivers for entering printer codes using function keys. For the latest update, whether in public domain or not, register by sending a contribution and suggestions to: David E. Miller 8207 Collier Place Tampa, FL 33637 813-985-4444 16