Dec 102017
Convert dBASE data to WordPerfect format.
File DBOWP5.ZIP from The Programmer’s Corner in
Category Dbase Source Code
Convert dBASE data to WordPerfect format.
File Name File Size Zip Size Zip Type
DB2WP.PRG 15096 3757 deflated
DBTOWP.TXT 6879 2256 deflated

Download File DBOWP5.ZIP Here

Contents of the DBTOWP.TXT file

March 28, 1986
REV November 5,1989


This paper explains how to use a dBASE III/IV database file of
names and addresses to print a form letter in WordPerfect. Don't
be put off by the number of steps involved. It took less than
three minutes to convert a dBASE file of 100 names and addresses
into WordPerfect and merge it with an existing form letter.

My database consisted of the following:

Field Name Type Width

LNAME Char 10
FNAME Char 10
TITLE Char 05
STREET Char 15
CITY Char 15
STATE Char 02
ZIP Char 05

STEP 1: Convert the database file to a form recognizable by

B. Change to the directory where the database file is

If you want the form letters to be in some kind of order,
be sure the database is indexed in the order you want. The
reason I printed the structure of my database is that I will
later need to know the field sequence. There are many ways
to convert a dBASE file (see dBASE III Users' Group
Newsletter Number 2, Feb. 19, 1986). The SDF (System Data
Format) option won't work in this case because it doesn't
delimit (mark the separation of) the fields. The Delimited
option delimits fields with a comma and also places
quotation marks at the beginning and end of each character

STEP 2: Convert the file to a WordPerfect secondary merge file.

A. Place the WP 4.2 Learning disk
or WP 5.0 Conversion disk in drive a:
B. Change to the drive and directory where
the database file is located
C. Make this drive and directory the default drive/directory
D. Type a:convert
E. When prompted, enter the name of the input file. That
is the file you created in Step 1 - E (filename2).
F. When prompted, enter the name of the output file. Think
up a new one (filename3).
G. WordPerfect presents you with a menu. Choose option
for Mail Merge.
H. WordPerfect asks you for the field delimiter. This is
the tricky part. Since we used the DELIMITED option in
copying the dBASE III/IV file, the fields are delimited
with a comma. The decimal equivalent of a comma is the
number 44. So, enter 44 enclosed in brackets {44}.
I. WordPerfect asks you for the record delimiter enclosed
in brackets. When we copied the dBASE file DELIMITED,
dBASE put a carriage return and a line feed at the end
of each record. So, enter {13}{10}.
J. WordPerfect asks you for any character to be stripped
from the file. Type the quotation mark " (not in
brackets) and ENTER.

STEP 1 and STEP 2 can be performed with the dBASE program


Copy this program to the disk and to the directory containing
the data base file you want to merge the addresses or other
information to the form letter or text in WordPerfect.

Next load dBASE and run this program from the dot prompt


You will be prompted for additional input on selection of
DBF files, fields, records as well as sorting of the records.

Continue the merge as described in STEP 3 and STEP 4 using
the file with the extension .WP created with DB2WP.PRG.

STEP 3: Create the WordPerfect Primary and Secondary files.

The primary file is the form letter. For instructions on
how to create one, see the WordPerfect manual. The only
tricky part is that you must remember to enter the Merge
Codes (Shift-F9) in the correct order. The ^F1 code will
bring in the first field, ^F2 the second field, etc.
Referring to the order of my database shown above, my
primary file used the following codes in the order shown.

WP 4.2

^F3 ^F2 ^F1 Mr. John Smith
^F4 1776 Patriot Drive
^F5, ^F6 ^F7 Jamestown, VA 22381

Dear ^F3 ^F1, Dear Mr. Smith,

WP 5.0

^F3^ ^F2^ ^F1^ Mr. John Smith
^F4?^ 1776 Patriot Drive
^F5^, ^F6^ ^F7^ Jamestown, VA 22381

Dear ^F3^ ^F1^, Dear Mr. Smith,

The ? in ^F4?^ will eliminate an empty line should
one or more records have no entry for this field.

In order to be able to use the secondary file created
with DB2WP read the ASCII-file .WP with the
Textin (Ctrl-F5) option and save it as a WP file with

STEP 4: Do the merge.

Once you have the primary and secondary files saved on your
disk, the merge is easy.

1. Clear the WordPerfect screen
2. Press the Merge/Sort key (Ctrl-F9)
3. Enter name of the primary file (the form letter)
4. Enter name of the secondary file (filename 3 from Step
5. The merge is now complete and the screen is showing the
last page of your merged file. The letters are
separated by hard page breaks. Save your file and you
are ready to print.

***** Lots of success *****

 December 10, 2017  Add comments

Leave a Reply