**NOTE:  TO PRINT THIS DOCUMENT TYPE AT THE DOS PROMPT IN THE DIRECTORY WHERE
THIS FILE IS LOCATED:  printme lpt1 (or whatever port your printer is using)
example:  C:\>printme lpt1

--------------------------------------
QUICK OVERVIEW OF THE QEXTRACT UTILITY -- More detailed info in QEXTRACT.DOC
--------------------------------------

QEXTRACT is a very quick and powerful data extraction utility for Q&A
database files.  You will want to run QEXTRACT only in those instances where
a file "recovery" and utilities "export data" have been unsuccessful.  In
addition, do not attempt to run QEXTRACT on a database file which a
recovery has been unsuccessful.  Running QEXTRACT on such a file will have
UNPREDICTABLE results at best.  Instead, use this program on the backup copy
you made before attempting recovery.

QEXTRACT features
-----------------

 * Extraction of data records into comma delimited, quotes around the text,
	standard ASCII files.

 * Extraction of the Q&A database form design into an ASCII text file.

 * Extraction of the "program spec" into an ASCII text file.

 * Compatible with Q&A for DOS versions 3.0 and 4.0 and Q&A for Windows.
	QEXTRACT will extract the data from Q&A for Windows databases but will NOT
	extract the form design.  In these cases, you will get an error message 
	indicating that the form design is missing or damaged.

Running QEXTRACT
----------------

When you have QEXTRACT in a utilities directory under Q&A (or wherever you
like) you are ready to begin extracting the information contained within
your database.  Type QEXTRACT at a DOS prompt while in the directory that
contains QEXTRACT.

You will be given five options at the QEXTRACT MAIN MENU.  These options are
described below.  Once you select an option the LIST MANAGER will prompt you
for a drive, path and file name.  Use the arrow keys followed by <Enter> to
search through your drives and directories, and select your database file
name.  The selected drive and path will always be listed below following the
word "File:"  For example:

	  File: C:\QA4\DATA\EMPLOYEE.DTF

In addition, you will be placed at the top of the list manager with each
change that you make.  Once you have highlighted your database name, confirm
your choice with a final <Enter>.  Next "Write to Directory" will appear and
you can select the DIRECTORY where you want the files that QEXTRACT creates
to be saved.
Note:  You can make a directory especially for this procedure at a DOS
prompt and choose that directory at this prompt.  (DO NOT try to enter a
file name, QEXTRACT only needs a directory name.)  QEXTRACT names the files
that it creates.
To use the default directory, press <Enter>.  Otherwise use the list manager
to select any OTHER directory.  NOTE: only directories will be listed at
this time.  After selecting a directory, press <F10> to continue or <Esc> to
return to the list manager.

INFORMATION FOR ADVANCED USERS:
The following command line options, in addition to the [drive:\path\]
filename.dtf work:
-d   data only
-f   form design only
-p   programming only
The default is "all".
example:  qextract c:\qa4\employee.dtf -f

Extract Data
------------

Extract data will search a Q&A database for any structure resembling a data
"record" and then extract out these data records to various comma delimited,
quotes around text, standard ASCII files based upon the number of FIELDS in
a given data record (e.g. "27.str").  These new ASCII files can then be
imported as "standard ASCII" into an existing or newly designed Q&A
database.  If more than one file is created during the extraction process,
you will want to refer to the following section for more information on
"DATA SHIFT" in an ASCII file.

Extract Design
--------------

Extract design will, when possible, extract out the database form design to
an ASCII text file named "DESIGN.ASC".  4.0 users can then insert this file
into a new database design using <F8> "Options-Document-Insert" while
designing a new file.

Extract Programming
-------------------

Extract programming will, when possible, extract out the database
programming to an ASCII text file name "PROGRAM.ASC".  This file may then be
re-entered manually, or inserted as above on a field-by-field basis.

Data Shift in an ASCII File
---------------------------

Your data has been extracted and saved in a comma delimited, quotes around
text, standard ASCII format.  If there are multiple files, the "###" in each
file name indicates the number of fields in a particular ASCII file.

The information that was extracted will most likely reveal that your data
has undergone what is referred to as "DATA SHIFT".  This was caused by
damage existing in your data base prior to extraction with QEXTRACT.  What
this means is that some records have either more or less fields in them than
others.  An example of this is illustrated below.  You can use the DOS
"type" command to view the contents fo the .str files.

(Example 1)
C:\>type 8.str <ENTER>

"101","1991/01/01","Smith","John","123 E St.","Lodi","CA","94211"
"123","1991/01/01","Smith","John","123 E St.","Lodi","CA","94211"
"290","1991/01/01","Smith","John","123 E St.","Lodi","CA","94211"
"143","1991/01/01","Smith","John","123 E St.","Lodi","CA","94211"

Note: This sorted file has eight (8) fields per record.

(Example 2)
C:\>type 7.str <ENTER>

"214","Smith","John","123 E St.","Lodi","CA","94211"
"123","Smith","John","123 E St.","Lodi","CA","94211"
"173","Smith","John","123 E St.","Lodi","CA","94211"
"193","Smith","John","123 E St.","Lodi","CA","94211"

Note: This sorted file has only seven (7) fields per record.

To put your data back into Q&A you will have to import one shifted file at a
time. This means that you will need to check each file before importing it
and determine what fields will need to be imported in what order on the
merge spec.  Refer to pages 3-188 for more information about importing a
standard ASCII file into a Q&A database.

An example of the two merges for EXAMPLES 1 and 2 follows.

For EXAMPLE 1 the merge spec would be something like:

   RECORD NUMBER: 1            DATE: 2

   LAST NAME: 3                FIRST NAME: 4

   ADDRESS: 5

   CITY: 6          STATE: 7        ZIP CODE: 8

   __________________________________________________________
   EXAMPLE.DTF                Merge Spec



Now to import the file that has "DATA SHIFT" (one less field than example 1)
you will need to skip the "DATE:" field on import as in the example below.

For EXAMPLE 2 the merge spec would be something like:

   RECORD NUMBER: 1            DATE:

   LAST NAME: 2                FIRST NAME: 3

   ADDRESS: 4

   CITY: 5          STATE: 6        ZIP CODE: 7

   __________________________________________________________
   EXAMPLE.DTF                Merge Spec


-------------------------------
QUICK SUMMARY OF USING QEXTRACT -- See QEXTRACT.DOC for more detailed docs.
-------------------------------

Besides running QEXTRACT to extract the data to the ASCII file, you will
also need to do a COPY DESIGN ONLY of the database.  This is done from
FILE, COPY, COPY DESIGN ONLY.  This will make an empty copy of the
database.  You can then use this empty copy to import the data back into
Q&A.  If your database is so badly damaged that you cannot copy the design,
you could always go to a backup and do the COPY DESIGN from it.  Otherwise,
if no backups of any kind exist, you would have to re-enter your design and
any programming.  Fortunately, QEXTRACT can also extract your design and
programming info as well.  So be sure to take the options to extract the
programming and design also if this is your situation.  

QEXTRACT has an excellent record of helping out when files are damaged by
things such as power failures, hardware failures, software conflicts, etc.
It can often get around very severe damage.  We usually tell customers that
it is as easy to do as 1-2-3 to use QEXTRACT, because there are three basic
steps involved in recovering a database with it.  They are: 

1)  Run QEXTRACT to produce the Standard ASCII file that contains your
    raw data.

2)  Make the COPY DESIGN ONLY of the database to create the new copy to
    receive the data that has been extracted from the damaged database.

3)  Go to FILE, UTILITIES, IMPORT DATA, STANDARD ASCII, to import this
    extracted ASCII file back into the new database.  At the retrieve spec,
    press F10 to get all of the records.  When presented with the ASCII
    Options screen, just press F10 to accept the defaults there as well.
    At that point, you should have a healthy database back with your data
    recovered as much as possible.


                       **** IMPORTANT NOTE ****

If you find the above quick instructions insufficient, are using the
Windows version of Q&A, have no prior experiencing in using data recovery
utilities, or are unsure about importing data into Q&A from an ASCII file,
more detailed and complete documentation on using QEXTRACT to recover your
data is included in this PKZip archive.  This text file you should read is
the file:

                             QEXTRACT.DOC

Again, if you have little previous experience in recovering data, it is
highly recommend that you read this more complete documentation file.

Good luck in recovering your data!

Lance Jacobs, SYMAPPS SysOp, Symantec Electronic Support

