










   PTC - PARADOX (R) TABLE COPY program
             Version 1.5x

         Copyright (c) 1991 Softools Development








  -*=============================================================*-

This software is copyrighted material.  It is being distributed under
the Shareware  concept to allow the user to evaluate the suitability
and "usability" of the product before purchase.

The user is granted a trial period of 30 days for evaluating this
product.  After this period, the user must either pay the author or
remove all copies of the software from use.

You may freely distribute this copy of PTC to other parties as long as
no fee beyond that of covering diskette duplication costs is charged.
You must use only the original "packed" file containing all the
untouched distribution files.

  -*=============================================================*-

THE SOFTWARE AND ACCOMPANYING DOCUMENTATION ARE PROVIDED "AS IS"
WITHOUT WARRANTY OF ANY KIND.  THE USER OF THIS SOFTWARE ASSUMES ALL
RISK AS TO THE RESULTS, PERFORMANCE, AND SUITABILITY TO ANY PERFORMED
TASK.  SOFTOOLS DEVELOPMENT WILL NOT BE LIABLE FOR ANY SPECIAL,
INCIDENTAL, CONSEQUENTIAL, INDIRECT OR SIMILAR DAMAGES DUE TO THE LOSS
OF DATA, LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION OR ANY OTHER
REASON.

  -*=============================================================*-


PTC Paradox Table Copy program ........................................ Page 2


Version 1.xx is the Shareware version of PTC.  It is intended to be a fully
functional program specifically for copying records between two Paradox (r)
tables.  However, more advanced features are implemented in the registered
version of this program.

If you find this product useful, please support continued development of this
and other Paradox utilities by sending $15.00 (plus tax) to:

          Ray Pascoe, Jr.              CompuServe ID:  76176,451
          Softools Development
          1710 Sartell Ave.
          Eagan, Mn.  55122

You will receive the latest level (version 1.6 or higher) of PTC and
documentation on disk.  Please specify either 5 1/4 or 3 1/2 disk. (See the
Order Form at end of this document.)

I will also gladly accept any further ideas and comments for this or other
utilities.  I can be reached at the above address or CompuServe ID.

AS A FURTHER INCENTIVE TO REGISTER, ALL PERSONS REGISTERING VERSION 1.5x WILL
AUTOMATICALLY RECEIVE VERSION 2.0 WHEN IT IS RELEASED.  This is a $10 savings
in registration fees, since version 2.0 will be $25. This offer expires
04/30/92.

The planned release date for version 2.0 is December 1991.

YOUR SUPPORT IS NEEDED, BOTH FINANCIALLY AND CRITICALLY.  I NEED TO KNOW IF
YOU ARE USING THE PRODUCT AND WHETHER IT IS WORKING FOR YOU.


  -*=============================================================*-

     - PTC was written using Borland C++ and the Paradox Engine 2.0.
     - Borland and Paradox are registered trademarks of Borland
         International, Inc.

  -*=============================================================*-



PTC Paradox Table Copy program ........................................ Page 3

Table of Contents

  1. Introduction .......................................  4

  2. Uses ...............................................  4

  3. Installation .......................................  4

  4. Details ............................................  5
      4.1. Usage ........................................  5
      4.2. Operation ....................................  5
      4.3. Tips .........................................  6

  5. Restrictions .......................................  7

  6. Warnings and Errors ................................  7

  7. Future Enhancements ................................  9

  8. Revision History ...................................  9

  9. Company and Personal Info .......................... 10


  Order Form ............................................ 11


PTC Paradox Table Copy program ........................................ Page 4


1. INTRODUCTION

PTC (Paradox Table Copy) is designed to copy records between two "dissimilar"
tables:  having different structures or field sizes.  It does this by
comparing the field names of the two tables and copying data between fields of
the same name.

Why bother with this program?  First of all, Paradox does not copy between two
tables which have different field structures (different sizes or field types).
Secondly, to do this in Paradox, you must either perform a query to copy data
to a new table, then restructure the Answer table, or you must write a small
script to scan each source record and insert it into the destination table.
Both of these are possible, but PTC is faster and easier.


2. USES

PTC can be used to perform several tasks, some of which are as follows:

     TABLE COPIES
          Use PTC to copy all records from one file to another,
          optionally appending to old data or emptying old data.

     TABLE INITIALIZATIONS
          Use PTC to copy the values of the "key" fields between
          two tables having the same keys.

     BLANKS-TO-ZEROES CONVERSIONS
          Use PTC to convert numeric blanks to zeroes by copying
          to a new table of the same format using the /Z option.

There are many more uses for PTC than those listed above, with more
possibilities available with the advanced versions.  Please refer to the
"FUTURE ENHANCEMENTS" section at the end of this document.


3. INSTALLATION

To install PTC, copy it to a directory which is either on your DOS Path or in
your working directory.  Copying it to your Paradox directory is probably the
most common choice.


PTC Paradox Table Copy program ........................................ Page 5




4. DETAILS

4.1. USAGE:

PTC is executed by typing the following command format at the DOS prompt:

     PTC  source[.db]  destination[.db]  [/E] [/Z] [/Q] [/V] [/T] [/P] [/W]

All fields inside brackets "[  ]" are optional: i.e., you do not need to
specify the "DB" file extension on the tables.  The "/" values are switch
options, which perform the following operations:

     /E - Empty the destination table before copying records
     /Z - convert numeric "blanks" to zero
     /Q - "Quiet" mode: reduces program information output
     /V - "Verbose" mode: outputs additional information
     /T - "Test" mode: enable "Verbose" but do not perform actual table copy
     /P - Pause every 24 lines of output
     /W - save Warning file (does not delete at end)

You MUST provide source and destination table names.  Otherwise, the rest of
the fields are optional.  Also, at least one space is required between each
parameter or option.  Options may be either upper or lower case letters.

An explanation of each option is as follows:

     /E   Performs an "Empty" on the destination table before copying records.
          The /T option will override and prevent this action.

     /Z   Will convert any "blank" numeric field in the source table record to
          a zero value in the destination record field.

     /Q   "Quiet" will prevent the display of table sizing information, copy
          progress indicators, and final results.

     /V   "Verbose" adds the display of the copy matrix information, showing
          which source fields match to the destination fields, if any.

     /T   "Test" prevents both the table empty request and the actual copy of
          data from source to destination tables. It also forces the /T option
          on.

     /P   "Pause" will pause the screen output every 24 lines and prompt the
          user to press any key to continue.

     /W   This option Prevents the deletion of the warnings file at the end of
          the program.  Normally, the file PTCWARN.TMP is deleted after
          echoing the warnings back to the screen after all records have been
          copied.


PTC Paradox Table Copy program ........................................ Page 6


4.2. OPERATION:

PTC operates by reading the field structure of each table and creating a "copy
matrix" between the two tables: matching field names between the tables and
copies/translates the data accordingly.  For field names of different types,
the  data conversion rules are summarized in the following table:


     Field Copy Matrix:

           To:   A       N       $       S       D
               -----   -----   -----   -----   -----
     From: A |  *1      --      --      --      --

           N |  --      OK      OK      *2      --

           $ |  --      OK      OK      *2      --

           S |  --      OK      OK      OK      --

           D |  --      --      --      --      OK

     Special Notes: *1 - May cause truncation if FROM larger than TO
                    *2 - Must be in the range -32,767 to 32,768

This conversion list will be expanded in future versions to include:

     1 - between "A??" and "N", "$", and "S".
     2 - between "D" and "A??"

See "Future Enhancements" at the end of this document for more information.

Under normal operations, PTC will display a status "graphic" indicating the
percent completion of the copy operation.  When done, the number of records
copied, the copy duration (in seconds), the copy rate (records/second) and the
number of warnings are displayed.  This is followed by the echoing of any
warning messages back to the screen.

If the "Quiet" option (/Q) is used, most of the output will be suppressed.  If
any warnings were generated, a message is displayed (which cannot be
redirected) indicating that the warnings can be found in the file PTCWARN.TMP.

4.3 TIPS:

If the "verbose" option (/V) is used, PTC will print the copy matrix to the
screen for review.  Use the page option (/P) on "wide" tables to prevent
information from scrolling off the screen. Otherwise, the output can be
redirected to a file for later viewing:

     PTC old new /E /V  > result.lst

The above will copy from "old.db" into "new.db", emptying new.db and printing
a list of the copy matrix to the screen.  However, the screen output has been
redirected to a file named "result.lst" so as to be reviewed at a later date
or printed.

PTC Paradox Table Copy program ......................................... Page 7


5. RESTRICTIONS

At the moment, there are several restrictions which should be noted in using
PTC:

     -  PTC does not presently recognize key fields as such. Therefore, all
          subsequent key violations after inserting the first record cause
          that data to be lost.

     -  PTC does not handle a "shared" or network environment.  You cannot
          have either of the tables being processed on the Paradox workspace
          of either your session or someone else on a network.

     -  PTC cannot access a Passworded table.



6. WARNINGS and ERRORS

There are several warning and error conditions which are possible. These are
detailed as follows:

Warnings:

   "Truncation possible for Field xxxxx (AA) " + field_name
        This warning indicates that the Source field size is larger than the
        Destination field size.  Data truncation is possible. For version 1.x,
        this warning is generated only in alpha-to- alpha copies.

   "Overflow possible for Field xxxxx (NS,$S) " + field_name
        This warning indicates that the Source field is either N or $ type,
        while the Destination field is an S.  The S field is not capable if
        containing numbers as large as can be stored in either an N or $ type.
        So, data loss is possible: converts to blank.  Also, values will be
        rounded to the nearest whole value.

   "No conversion available for Field xxxxx ( yyy to zzz ) " + field_name
        This warning indicates that the Source and Destination fields are
        incompatible data types.  The Destination will be blank filled.  "yyy"
        is the Source type and "zzz" is the Destination type.

Errors:

   "Unknown Parameter #"...
        This error is generated when PTC cannot recognize one of the input
        parameters.  Check the parameter indicated and re-enter the command.

   "ERROR: Must give two table names on command line."
        For version 1.x you must specify both the Source and Destination
        tables.  This error is generated when only one name was recognized.


PTC Paradox Table Copy program ........................................ Page 8


   "Source File Open error"
        This error means that PTC could not find the Source table.

   "Destination File Open error"
        This error means that PTC could not find the Destination table.

   "PXEngine Init Error"
        This error indicates that a problem occurred during the initialization
        of the Paradox Engine initialization sequence, possibly low on memory.

   "PXEngine Error"
        This error can occur on any data operation.  It is followed by a more
        detailed description of the problem.

   "Source table empty.  Nothing to copy."
        This is not really an error.  However, it will terminate further
        program execution.


In addition, there are several warnings which may be generated during the copy
operation.  These are as follows:

   "Record xxxx  Fld yyy : SRC value too negative for DST fld"
        This warning indicates that the value in the Source field was less
        than -32,768.  The Destination field is blanked.

   "Record xxxx  Fld yyy : SRC value too large for DST fld"
        This warning indicates that the value in the Source field was greater
        than 32,768.5.  The Destination field is blanked.

   "Record xxxx  Fld yyy : SRC string truncated"
        This warning indicates that the Source string value was longer than
        the Destination field, causing data loss from the right.

PTC Paradox Table Copy program ........................................ Page 9


7. FUTURE ENHANCEMENTS

Presently, enhancements consist of the following items:

Version 1.x

     1 - Improved command line parsing
     2 - Conversions between "A??" and "N", "$", and "S"
     3 - Copy-back to same table (Update) using the /z option to force blanks
           to zeros.


Version 2.x  (December 1991)

     1 - Use a "Definition" table to identify fields with different names to
           copy between.
     2 - Limited Date conversions between "A??" and "D" field types.
     3 - Improved network file handling
     4 - "/I" option to ignore case of field names
     5 - Options for handling duplicate keys
     6 - Options for specifying passwords.


Version 3.x  (April 1992 ??)

     1 - Add interactive Table Translation capabilities
     2 - Add expanded "options" using keywords
     3 - Add a response/configuration file



8. REVISION HISTORY

1.1:
   (Internal use, not released)

1.2:
   - Initial release to test groups.

1.3:
   - Changed "dot" activity output to a "% Complete Meter"
   - Fixed "Divide by Zero" problem when time duration = 0.0
   - Improved the documentation

1.4:
   - Improved time duration measurement routines

1.5:
   - Added conversions: S->$, S->N, $->S, N->S
   - Added conversion error warning output file and display
   - Added check for output redirection to control PAUSE and %-complete display
   - Added /W option to "save" the warnings file from being deleted at end

PTC Paradox Table Copy program ........................................ Page 10


9. Company and Personal Info

Ray Pascoe started his career in 1978, programming automated test equipment
controlled by an Intel 8080 8-bit microprocessor (in "machine code").  He was
working for the Semiconductor Operations of a major mainframe manufacture in
the product design area.  With an increasing need for data analysis and
automation, he soon became a key developer of in-house software systems
(primarily on mainframe computers).

In 1984 he purchased his first PC (8088 system, 640K memory, two 360K drives,
monochrome monitor) and began investigating the uses and internals of this new
programming environment.

Softools Development started with the request to build a program for helping
BBS operators sort incoming messages using the function keys as selection
"bins".  After 18 months of very sporadic effort, "BinTool" became a
functional, viable product.  So, on January 1, 1990, Softools Development was
formally created.  One year later, in January 1991, BinTool was released on
CompuServe.

Since then, he's added Paradox consulting to his list of support
opportunities.  He still works full-time for the same major mainframe
manufacturer, providing support and development activities on off- hours and
vacations.

Ray has dabbled in a wide variety of languages, including LISP and Prolog.
However, Turbo Pascal and C remain his two favorites. BinTool was developed in
Turbo Pascal (versions 4.0 thru 5.5), while PTC is being developed in Borland
C++.  He has invested in a wide variety of libraries and support tools to
better meet the needs of his clients and users, and plans to expand support
into the Microsoft Windows environment.


PTC Paradox Table Copy program ........................................ Page 11


 PARADOX TABLE COPY - PTC


 Register me for _____ copies of PTC 1.x @ $15.00 each .... _________

                                         (Mn) Sales Tax ... _________ *

                                                     Total $_________ **

            Disk Format(s): _____ 5 1/4    _____ 3 1/2

            Send to:

                    Name: ______________________________________

                 Company: ______________________________________

                 Address: ______________________________________

                    City: ______________________________________

                   State: _______     ZIP __________


       ----------------------------------------------------------------------

            *  Minnesota Sales Tax ( 6.5 %), Minnesota residents only.

            ** Payment either by Check or Money Order, please.

            Send Order to:      Ray Pascoe, Jr.
                                Softools Development
                                1710 Sartell Ave.
                                Eagan, Mn.  55122


       !!  NOTE: Please write for special Group or Site License discounts. !!
       ----------------------------------------------------------------------

       Comments or Suggestions:

