This software may be freely copied with the only restriction that all rights to commercially market the software remain solely with the programmer.
(c) Michael Mackay 1985
22 East 31st St. (4B)
New York, N.Y. 10016
DISCLAIMER:
There are no warranties, express or implied, in the fitness of this software and in no event shall the programmer be held responsible for any indirect, special, incidental or consequential damages or losses resulting from its use.
PROGRAM SPECIFICATIONS:
REP consists of two command files written in standard DBASEIII command language (REP.PRG and REPSUB.PRG) and an ASCII text file containing instructions (REP.DOC). No experience in DBASE programming is needed to run this program. However, an understanding of word processing, particularly global search and replace features, is assumed. Users should first experiment with this program on a test database.
PURPOSE:
REP is a specialized word processing program for conveniently editing records. It allows for easy insertion, deletion or replacement of text within a specific field without the cumbersome process of manually positioning the cursor and entering one or more control keys. REP is particularly useful for editing long fields and performing the same change in more than one record (global search and replace). The program also provides considerable flexibility: changes may be confirmed record-by-record (verified) or entered automatically (global). For verified changes, select records may be skipped, edited manually, or replaced with an alternate character string.
INSTRUCTIONS:
1. To initiate REP enter the following command from the DBASE dot prompt:
. do rep
(Unless otherwise indicated, all characters may be entered in upper or lower case. In these instructions system prompts appear in uppercase and operator responses appear in lower case.)
NOTE: The program proceeds from the current record.
2. Enter the name of the field you wish to search, e.g.:
FIELD TO SEARCH: desc
3. Enter the character string you wish to search for and replace, e.g.:
REPLACE WHAT: sesame
NOTE: This part of the program distinguishes between upper and lower
case letters.
4. Enter the text, if any, you wish to replace the old character string with:
REPLACE WITH: poppy
NOTE: This part of the program distinguishes between upper and lower
case letters.
5. The program displays the search condition, e.g.:
If no records are found to contain "sesame" in the DESC field, the following message appears:
NUMBER OF REPLACEMENTS: 0
If a record is found that matches the search string, the record number, the name of the field and the field contents are displayed. At the bottom of the screen the followup options are presented, e.g.:
DESC: Two all beef patties, special sauce, lettuce, cheese, pickle,
onion on a poppy seed bun.
ITEM REPLACED.
FIND NEXT ONE? (Y/N)
Type 'Y' to continue the search. Enter <RETURN> to return to the dot prompt. If you type 'N', the following prompt appears:
ANOTHER CHANGE, SAME FIELD? (Y/N)
Type 'Y' to enter a new search string. Searching will proceed from the top of the database. Enter <RETURN> to return to the dot prompt. Type 'N' to return to the original prompt:
ENTER FIELD TO SEARCH:
At the end of each search the total number of replacements is displayed.
SPECIAL CASES:
1. If the field being replaced contains more than one occurrance of the search string all occurances will be flagged for replacement. There are two exceptions where only the first occurance will be replaced: (1) if the record is the first record in the database, and (2) if the replacement string includes the search string, e.g. REPLACE cheese WITH Swiss cheese.
2. If the replacement will cause the field contents to exceed the field length the following warning message will appear:
WARNING - LAST x CHARACTERS WILL BE LOST.
"X" refers to the number of characters that will be trimmed by the replacement. This feature is only active during verified replacements.
3. If a semi-colon is to be included in the search string, make sure it is NOT the last character. A semi-colon at the end of the search string acts as a pause in the program's execution.
TO EXIT THE PROGRAM:
Press <RETURN> at any of the following prompts:
FIELD TO REPLACE:
ENTER YOUR SELECTION HERE:
FIND NEXT ONE? (Y/N)
ANOTHER CHANGE, SAME FIELD? (Y/N)
or press the <Esc> key at any time during the program's execution.
Enter "Y" after the DBASE message: Terminate Command File? (Y/N)
LIMITATIONS:
1. REP works only with character-type fields.
2. The search string may not contain both single and double quotes. An error message appears.
3. The program will not be able to make a replacement in a field that contains both single and double quotes. You will be prompted to edit the field manually.