home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
dbpowr44.zip
/
DBPOWR44.DOC
next >
Wrap
Text File
|
1986-11-09
|
22KB
|
722 lines
dbPOWER 10/86 Version 4.4
READ ME FIRST
dbPOWER is Menu driven.
dbPOWER is Command line driven.
dbPOWER is Parameter file driven.
Use the menu to learn how to use dbPOWER. Answer yes or
no to the various options and fill in the name of a file
to search or map. It is that easy.
LIMITATIONS
dbPOWER reads files a line at a time. In searches of files
with imbedded control codes, dbPOWER considers a line to be a
connected group of printable characters.
In search and replace operations make sure that there is
enough room on the disk to hold backup copies.
dbPOWER is a powerful tool for modifying all kinds of files.
Before using make sure your files are backed up. Modification,
especially of non-text files, may make them unusable. (The
default backup option automatically saves your original file
with the extension .BAK)
4.4 Enhancements
1. % Specify NAME of MAP FILE. Overrides default selection.
a. On command line: dbPOWER main /AIW %fmap.out
b.In parameter file before search/replace strings:
%fmap.out
c. From Menu: Enter map file name at menu
2. ; Specify PATH for search and mapping. Start with ;.
a. On command line: dbPOWER main /AIW ;c:\;c:\wp\doc
b.In parameter file before search/replace strings:
;c:\;c:\wp\doc
c. From Menu: Enter path at menu
3. /T FILE TIME & DATE
File lists show the DOS time and date. Default is T (on).
4., Specify index file for dBASE applications. Default: NDX
a. On command line: dbPOWER main /AIW ,NTX
b.In parameter file before search/replace strings: ,NTX
c. From Menu: Enter index type at menu.
5./Z Delete backup after search and replace.
Since dbPOWER can search/replace in multiple files there is the
potential for creating large numbers of backup files quickly. The /Z
option avoids this by deleting the backup file. Default is off.
6. Search DBF files using WILD CARDS.
7.Show STRUCTURE of DBF files and INDEX RELATIONSHIPS
/E. Default is Off
WELCOME TO dbPOWER Ver 4.4
Copyright 1986 NuSYSTEMS
WHAT dbPOWER DOES
For Everyone:
-Rapid documentation of any text pattern in most files.
Multiple files searched for multiple patterns.
Patterns may contain wild cards. All finds shown in detail in
disk file and on screen or printer.
-Rapid simultaneous updating of files. Find/replace/edit lines
with matching patterns across multiple files with or without
confirm.
- Operates on most files including COM and EXE files.
For dBASE Users:
-Point dbPOWER at the program file you use to start your dBASE
application and a map of the usage of every Program and
Procedure file will be produced.
-Produces a list of all proc, prg, dbf, ndx, lbl, frm, mem
files used. (Includes file time and date.)
- Maps use of any variable, command or text.
-Use map/find/replace/edit mode for rapid updating of your
entire application.
-Shows structure of dbf and index files.
(Including Clipper and Foxbase index files.)
For C Users:
-Point dbPOWER at the program file you use to start your C
application and a map of the usage of every # include file
will be mapped.
- Map usage of any variables, key words or text.
-Use map/find/replace/edit mode for rapid updating of your
entire application.
IMPORTANT Place lines similar to these in a file called CONFIG.SYS in your
BOOT directory: files = 20
buffers = 24 TUTORIAL
All examples can be executed from the menu by first entering A:dBPOWER and
selecting the desired options. At any menu option ? will give an additional
line of help.
Options are turned on/off with upper/lower case letters.
Example 1
We will map the usage of all program files in a dBASE application that
is invoked by DO MAIN . Enter:
dBPOWER MAIN /A
The map will be displayed on the screen and in a file called MAIN_.MAP.
A is for dBASE (Ashton Tate).
Example 2
We want to find every place in the above application where we have used
the variable wigwam. Enter:
dBPOWER MAIN /SAIw
We will be asked to enter the type of search. I is for ignore case.
Choose i for exact match. W is for wild card search. w says no to wild
cards.
We will be asked to enter search string 1. Enter:
wigwam
Press enter again to end input.
MAIN_.MAP will be produced as in example 1, but every occurrence of
wigwam will be included in the map, showing by indentation the file in
which wigwam occurred and the line number. The entire line for each
match will be displayed in the map.
Example 3
Scan all text in dbPOWER.EXE file.
dbPOWER.EXE /SW
For search string enter: *
Example 4
This time we want to replace each occurrence of wigwam with tepee
without confirm.
dbPOWER MAIN /AScI
When we are asked to enter search string 1, enter:
/wigwam/tepee/
Now dbPOWER will begin as in example 2 but after dbPOWER finishes
MAIN_.MAP it will begin search and replace operations. Original files
will be save with the extension .BAK.
At each occurrence of wigwam you will be asked (R)eplace, (D)elete,
(E)dit, (S)kip, (N)ext file, (Q)uit.
You will be also see:
(1) the number of find and replaces found
(2) the one we are up to
(3) the original line
(4) the part that will be changed
(5) what it will be changed to
(6) the file name
(7) the line number
Edit allows you to freely edit the line. Two lines are shown but the
two lines will be a single line in the final file. (Lines are
limited to 256 characters and lines to be edited are limited to
less than 160 characters.)
Quit finishes the current file without any more changes and ends the
search/replace/edit operation.
Next finishes writing the current file with no additional changes and
proceeds to the next file where matches occurred.
For each file where wigwam occurs a file with the same name but with
extension .BAK will contain the original version.
Example 5
Change every getword to keyword in every file on the current directory
including EXE, COM, etc.
dbPOWER *.* /HiS
Select i if case matters. For search string one enter:
/getword/keyword/
Press enter again to end entries. Now every occurrence of getword will
be mapped and we will be prompted whether to replace. If we use /SHic
we would have turned off confirm and replacement would occur without
pause.
Example 6
We have a file FILES.LST that contains a list of files. We want to find
every occurrence of
REPORT FORM anything TO PRINT
except that we may have used REPO or REPOR or PRIN in some cases. Enter:
dbPOWER @FILES.LST /SAIW
The @ tells dbPOWER that this file contains a file list. A batch file
which contains a list of files with the form %1 fname.ext %2 is ok.
W set a wild card search. For search string 1 enter:
$REPO~FORM*TO~PRIN
The $ means that the line must start with REPO.
The first ~ means that after REPO ignore intervening characters until we
come to the first F which must be followed by ORM.
The * means that following the ORM and ignoring intervening characters
there must be a TO followed by some stuff (as indicated by the second ~)
but the very first P thereafter must be followed by RIN.
If the role of the ~ is not clear you can substitute the * which is more
general. Note that TO PRIN would miss a TO separated from PRIN by a tab
or multiple spaces.
Example 7
We want to find every groovy in our .txt files. Enter:
A:dbPOWER *.TXT /IS
We choose ignore case. For search string one enter:
groovy
Press enter to end input. A file AT__.map will be created which will
show everywhere groovy occurred. A file AT_ with an alphabetical list
of files that met the specification *.txt will also be created.
Example 8
Map every occurrence of getword in a C application called MAP.C .
A:dbPOWER MAP /USi
i is for exact match. For string 1 enter: getword Press enter again.
A map of the usage of getword will be created in file MAP_.MAP.
Minimum Scan Size:
The scan size option is automatic when dBASE or C options are in effect.
In any other case an optimum size will be selected by dbPOWER but may be
overridden by user.
Example 9 dbPOWER TEST.EXE. /S
Search string: hello
dbPOWER will use the length of the smallest search
pattern, which is 5 in this case as the minimum scan
size.
Example 10 dbPOWER TEST.EXE /S3
Search string: ?
dbPOWER on its own would have chosen 1 for the minimum
scan size. But we have chosen 3 so that every printable
combination of 3 or more characters will be found.
This is equivalent to leaving out the 3 and instead using
??? for the search pattern. REFERENCE
We suggest that you work with practice files following the tutorial examples.
Then read the rest of this manual.
Features: First time users can simply type dbPOWER for a menu
of options. Program files must be in current directory.
1. MAPPING
Mapping of dBASE Program Files - Including Procedure Files
Usage: dbPOWER FILENAME /A
A is dBASE option. Filename is the name of the PRG file you use to
start your application. If no ext is given .PRG is automatically
added. You can use FILENAME. to prevent this.
To include files named with macro &file include code like:
if .f.
do mac1.prg
do mac2.prg
endif
A list of all prg, ndx, dbf,mem,lbl,frm files follows the map. The
default name of the map file is file_.map.
Mapping of C files.
Usage: dbPOWER FILENAME /U
Specify name of map file. Overrides default selections.
a. On command line: %fmap.out
e.g.: dbPOWER main /AIW %fmap.out
b.In parameter file: First line. Or 1st or 2nd
line if there is a flag line. e.g.:
-AIW
%fmap.out
find me
c. From Menu: Enter map file name at menu.
WARNING! If a file with the same name (e.g. fmap.out) exists it
will be overwritten.
2. GLOBAL SEARCH with Mapping of multiple patterns -
Choice of wild card W/w, ignore case I/i for search.
Usage: dbPOWER [@]FILENAME.PRG [-SEARCH.PAR] [/S]
Items in [] are optional. For menu operation: dbPOWER
-SEARCH.PAR See Parameter File Section below.
/S Selects Keyboard entry of search patterns.
@file A file containing a list of files to be mapped. See below.
*.prg or *.c etc. can be used instead of an unambiguous file name to
map and/or search/replace/edit all prg or c files on the current
directory in alphabetical order. With wild card file specification
an at_ file is created with file list. This file is then used as
though the command line had been @at_ producing at__.map.
3. Global Search/Replace/Edit on multiple patterns.
Find and replace patterns are delimited with "/" and can have 2 or 3
parts. Three or Four "/"s are required.
Confirm replacement is the default. Specify /c on command line or No
confirm from menu to turn Confirm off.
Three Part Find/replace pattern:
1. What to look for
2. What to remove
3. What to replace it with
/What to look for/what to remove/what to replace it with/
Two Part Find/replace pattern:
1. What to find & remove
2. What to replace it with
/What to find/What to replace it with/
Example 1 Wild card search "W"
/USE*PROG1/PROG1/&PROG1 ALIAS PROG1/
or
/PROG1/&PROG1 ALIAS PROG1/
If a line such as this is found in your application:
use Prog1
The line will be changed to:
use &PROG1 ALIAS PROG1
Example 2 Ignore case search "I"
/abc/ab/def/ Look for abc. Replace ab with def.
or
/ab/def/ Look for ab. Replace ab with def.
If the following line is found:
The alphabet is like this abcdefg or like this ABCDEFG.
The line will be changed to:
The alphabet is like this defcdefg or like this defCDEFG.
In an exact match ("i") search the line would become:
The alphabet is like this defcdefg or like this ABCDEFG.
ALL FINDS ARE MADE AND MAPPED BEFORE REPLACE or EDIT OPERATION BEGINS.
Once replace/edit begins you may:
S - skip (no change), D - delete, R - replace, E - edit, N - no further
changes in current file (go to next file), Q - finishes current file as
with N but then ends replace/edit operations.
Your original file is saved in a file with the .BAK extension.
Note that a find replace string starts with a "/" and has 3 or 4 of
them. Do not use a file with the .BAK extension as input for the
find/replace operation.
4. BATCH FILE /B option
With dBASE option: dbPOWER FNAME1 /BA
Alphabetic listing of all files including DBF,NDX,LBL,FRM, and MEM
files in fname1_.bat. Sample batch file: FNAME1_.BAT
%1 FNAME1.PRG %2
%1 FNAME2.PRG %2
%1 FNAME3.DBF %2
With C option: dbPOWER FNAME1 /UA FNAME1_.BAT will contain an
alphabetic listing of all files found in # include statements.
The .BAT file can be then be used for a search: dbPOWER @FNAME1_.BAT /S.
5. FILE LISTS and WILD CARD FILE SPECIFICATION
Any list of files can be searched, including a batch file created with
the /B option.
dbPOWER @FILE.LST /S
or dbPOWER @FILE_.BAT /S
FILE.LST: or FILE_.BAT:
examp1.txt %1 examp1.txt anything else on line ignored
examp2.txt %1 examp2.txt %2
ctype.c %1 ctype.c %2
Wild Card File Name Specifiacation on Command Line:
dbPOWER *.C /W or dbPOWER *.PRG /A or dbPOWER my???.txt
This is the same as if a sorted @FILE had been given. A file at_
is created with a sorted list of the files found. The map file will
be at__.map .6. FLAGS and OPTIONS and DEFAULTS
dbPOWER [@]FNAME [-SEARCH.PAR] [/ABCDn...]
Items in brackets are optional.
Creates: FNAME_.MAP and FNAME_.BAT
or for menu operation dbPOWER
n is a number. See below.
Lower case letters turn option off.
On Off Default
/A /a /a On for Mapping dBASE applications
/B /b /b Make batch file %1 file1.prg %2 etc.
/C /c /C Confirm on search and replace
/D /d /D Display map on screen
/H /h /hHex mode for replace or edit in binary files. Requires
replacement text to be same size as original text.
/L /l /LShow line numbers on screen as dbPOWER proceeds. Line
numbers are not significant in non-text files.
/M /m /M Write map to disk file.
/S /s /sEnter search find/replace patterns.
/T /t /tInclude DOS file date and time in map file.
/U /u /uC programming option. Default extension is .c and #
include files are mapped and searched.
/X /x /x Maps where each auxiliary file is found.
/number dbPOWER by default optimizes this number. Specifies
minimum scan size for search when dBASE and C options are
not selected. A line with fewer characters will not be
scanned. A large number speeds operation on binary
files. See the difference between 1 and 30 on a search of
dbPOWER.EXE.
Search types:
/I /i /i Ignore case.
/W /w /w Use wild cards in search.7. MORE ON WILD CARDS and OTHER SPECIAL CHARACTERS IN SEARCHES
Wild Cards in Search Pattern:
? * Works like DOS filename wild cards
~ Look for next match to pattern.
e.g. USE*INDE will find Every case where USE is used with INDE
USE~INDE will only find INDE if the filename doesn't contain "I".
e.g. REPO~FORM will find every case of this command
REPO*FORM will also find REPOINT = 10 * FLAGFORM
both will find REPOINT = 10 * FORMFLAG
Other Special Characters in Search Patterns:
` Used to specify that the pattern must begin with the next character
(if ` is first) or end with the previous character (if ` is last).
e.g. `CHO` This is the same as saying that cho must be a whole word.
$ at beginning of pattern means that match must be to beginning of
line ignoring white space.
8. The Parameter File
-SEARCH.PAR A parameter file is a file that can set the options and a
list of search patterns or search and replace patterns. Sample parameter
file: SEARCH.PAR
-WIc
$INDE*ON
PR??TAX
John Doe
/abc/ab/def/
The first line is a flag or option line and is optional. The lower case
"c" turns CONFIRM off. If included the flag line must be the first line
and must begin with - . The other lines are search patterns. The last
line is a search/replace/edit pattern. File is limited to 255 patterns
including flag line.
9. The Map File
For each file the map shows the level at which it was found.
For each find the map shows the number of the pattern, the line number
at which it was found, and the entire line.
Special Characters
? File was not found.
@ File found in one of the listed files. Not scanned at this time.
* File previously found and not scanned at this time.
x Not a DOS filename.10. Editing Highlighted Entry Fields:
Enter or return to record edited line.
Escape causes immediate exit from edit.
Destructive backspace.
Insert - inserts blank character at cursor.
Delete - deletes character at cursor.
Tab - skip to next word.
Home -go to first character on line.
The two highlighted lines in edit mode are joined to form the edited
line.
Ctrl End- erases to end of line.
11. Files Created by dbPOWER:
Wild Card Filenames:
at_
at__.map
at__.bat
From file names or file lists:
fname_.map
fname_.bat
prog1.bak
prog2.bak
12. Quick Termination
dbPOWER may be terminated by pressing <Ctrl C>
13. Capacity. Demo versus Full version
The DEMO version is full featured but is restricted to 10 files of each
type and files under 500 lines.
The full program is limited to 512 files for mapping and searching.
There is no limit on file size but user is responsible for making sure
there is disk space for the changed files and the backed up originals.
Edit lines are restricted to less than 160 characters. Find and replace
lines are limited to 256 characters.
14. MENU
Placing a question mark in any field produces a line of help information
relating to that item.
We would be happy to here from registered users of this program.
Author: Peter BellinREGISTERED USERS ARE GRANTED THE OF USE THIS PRODUCT WITH A SINGLE COMPUTER.
ALL RIGHTS RESERVED.
We agree to replace this product if dbPOWER is proven defective within
10 days of purchase. We make no other warranties.
The price of this program is $54 + $4 shipping and handling. Add $3 for
COD. Registered users will receive information on updates and other
products.
---------------------------------------------------------------
dbPOWER REGISTRATION FORM
Name_______________________________Ser. No. ___________
Address________________________________________________
City__________________________________St____Zip________
Country_______________________
Send to:
NuSystems
19 Claremont Ln
Suffern NY 10901
914/357-7744
---------------------------------------------------------------
dbPOWER 10/86 Version 4.4
READ ME FIRST
dbPOWER is Menu driven.
dbPOWER is Command line driven.
dbPOWER is Parameter file driven.
Use the menu to learn how to use dbPOWER. Answer yes or
no to the various options and fill in the name of a file
to search or map. It is that easy.
LIMITATIONS
dbPOWER reads files a line at a time. In searches of files
with imbedded control codes, dbPOWER considers a line to be a
connected group of printable characters.
In search and replace operations make sure that there is
enough room on the disk to hold backup copies.
dbPOWER is a powerful tool for modifying all kinds of files.
Before using make sure your files are backed up. Modification,
especially of non-text files, may make them unusable. (The
default backup option automatically saves your original file
with the extension .BAK)
4.4 Enhancements
1. % Specify NAME of MAP FILE. Overrides default selection.
a. On command line: dbPOWER main /AIW %fmap.out
b.In parameter file before search/replace strings:
%fmap.out
c. From Menu: Enter map file name at menu
2. ; Specify PATH for search and mapping. Start with ;.
a. On command line: dbPOWER main /AIW ;c:\;c:\wp\doc
b.In parameter file before search/replace strings:
;c:\;c:\wp\doc
c. From Menu: Enter path at menu
3. /T FILE TIME & DATE
File lists show the DOS time and date. Default is T (on).
4., Specify index file for dBASE applications. Default: NDX
a. On command line: dbPOWER main /AIW ,NTX
b.In parameter file before search/replace strings: ,NTX
c. From Menu: Enter index type at menu.
5./Z Delete backup after search and replace.
Since dbPOWER can search/replace in multiple files there
is the potential for creating large numbers of backup
files quickly. The /Z option avoids this by deleting the
original file after the search/replace operation on that
file is completed. Default is off.
6. Search DBF files using WILD CARDS.
7.Show STRUCTURE of DBF files and INDEX RELATIONSHIPS
/E. Default is /e (off)