home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / DATABASE / PARADUMP.ZIP / PARADUMP.DOC next >
Text File  |  1992-07-18  |  17KB  |  463 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8. PROGRAM:       PARADUMP.EXE version 1.05
  9.                Copyright (c) 1992 by Thomas A. Lundin.
  10.                All Rights Reserved.
  11. DESCRIPTION:   Paradox Data Export Program
  12. RELEASE DATE:  7/18/92
  13. AUTHOR:        Thomas A. Lundin
  14.                16267 Husdon Avenue
  15.                Lakeville, MN 55044
  16. PHONE:         (612) 588-7571 (8am-5pm Central, weekdays)
  17.                (612) 431-5805 (nights and weekends)
  18. REGISTRATION:  $25 per copy (site licenses available)
  19.  
  20. ABSTRACT:
  21.      PARADUMP is a stand-alone program which exports Paradox 3.0/3.5
  22.      database tables into any of five different formats: fixed-length
  23.      fielded ASCII, comma/quote-delimited ASCII, comma-delimited ASCII,
  24.      tab-delimited ASCII, and WordPerfect 5.1 secondary merge format.
  25.  
  26. REVISION HISTORY:
  27.      1.05 7/18/92   Fixed bug for alpha fields >127 characters
  28.      1.04 6/30/92   Fixed bug for >32K records
  29.      1.03 6/9/92    Added output count, redirected structure output
  30.      1.02 5/25/92   First shareware release
  31.  
  32.  
  33. PARADUMP.EXE is distributed as shareware. It is not free software. If you
  34. continue to use this program beyond a 30-day trial period, you are required
  35. to register it. The registration fee for this version is $25 per copy. Upon
  36. registration, you will receive the most recent version of the program
  37. without the compliance message. Make checks payable to Thomas A. Lundin
  38. (U.S. funds and drawable at a U.S. bank). Please send your registrations
  39. to:
  40.  
  41. Thomas A. Lundin
  42. 16267 Hudson Avenue
  43. Lakeville, MN 55044
  44.  
  45. The registration fee for PARADUMP on network file servers is a $50 flat
  46. charge for up to 20 workstations PER SERVER, and a $100 flat charge for
  47. unlimited (over 20) workstations PER SERVER.
  48.  
  49. I welcome suggestions and comments regarding PARADUMP.EXE. The suggestions
  50. of registered users will always be considered first. Please respect the
  51. tenets of shareware and register if you intend to use the program beyond
  52. the trial period. It is my policy to not add features to the program on the
  53. promise of registration, so if you are not a registered user, please do not
  54. ask me to change the program to suit your needs. Program bugs are a
  55. different story. I will investigate reported bugs from any user and will
  56. attempt to fix those within my control.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74. DISCLAIMER.
  75.  
  76. This program and its associated documentation are provided AS IS, without
  77. any express or implied warranty. The program is not warranted as to
  78. suitability or fitness for any particular purpose. The author and/or
  79. distributor of this program shall not be held liable for any perceived or
  80. real damages emanating from the use or misuse of this program. The user of
  81. this program understands that operation of this program is undertaken at
  82. the user's own risk.
  83.  
  84. INTRODUCTION.
  85.  
  86.      The impetus for writing PARADUMP came out of my frustration at trying
  87.      to export a fixed-length ASCII file from a Paradox 3.5 data table. The
  88.      only method prescribed by Borland was to create a Paradox report
  89.      specification and output the report to disk. So I tried that, and two
  90.      problems became immediately apparent: 1) outputting from a report was
  91.      tediously S-L-O-W, and 2) the last field of a fixed-length record
  92.      wasn't padded to its full field width. This meant that I had to put a
  93.      dummy field at the end of each record to ensure that the last Paradox
  94.      field would be padded out. All of this rigmarole for each table
  95.      (creating a report specification, placing a dummy field, outputting to
  96.      disk) was too much for me to bear, especially when compounded by the
  97.      exorbitantly slow output times. It was actually much faster to use the
  98.      ASCII Delimited Export command sequence in the Tools menu, and to run
  99.      the exported file through a file filter that padded the variable-
  100.      length ASCII fields back to a fixed-length form, but this wasn't
  101.      exactly an elegant long-term solution. The other option I was offered
  102.      was to purchase the Paradox Database Engine for $99, which seemed like
  103.      overkill for what should have been an atomic Paradox operation in the
  104.      first place, and besides, I've seen programs written with the Engine,
  105.      and they seem incredibly bloated for what they do. Nobody at Borland
  106.      wanted to provide me with any hints on the Paradox table structure (as
  107.      if that information was somehow Restricted For Reasons Of National
  108.      Security), so I spent a couple of weeks reverse-engineering it and
  109.      writing this program in my spare time.
  110.  
  111.      PARADUMP does exactly what I wanted it to do: reads a Paradox table
  112.      and creates a fixed-length ASCII file from it, in one step. The
  113.      performance of PARADUMP is roughly the same as the ASCII export
  114.      command in Paradox, which I find quite acceptable, and in any case
  115.      infinitely better than Report. A record layout for the converted ASCII
  116.      file is generated in a file named PARADUMP.STR. (A record layout is
  117.      critical if you expect someone else to import the fixed-length data
  118.      into another program.)
  119.  
  120.      Once the code base was complete, it was a simple matter to extend the
  121.      conversion process to allow export into several other transfer
  122.      formats. This facility should allow Paradox files to be exported for
  123.      use with most other word processing and database programs.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.                                            PARADUMP.DOC REV. 7/18/92 PAGE 2
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140. USING THE PROGRAM.
  141.  
  142.      The program is command-line driven. The form of the command line is:
  143.  
  144.      paradump PDOXTBL.DB OUTPUTFILE.EXT [Pn[,n,n...]] [On] [Dn]
  145.  
  146.      where:
  147.  
  148.      PDOXTBL.DB is the name of the Paradox file to be exported.
  149.  
  150.      OUTPUTFILE.EXT is the name to give the exported file.
  151.  
  152.      Pn... is an optional format for specifying the number of decimal
  153.      places to show in NUMERIC fields. The 'n' represents a numeric value.
  154.      More on this later.
  155.  
  156.      On is an optional switch for specifying the type of output file to
  157.      create. The 'n' represents a numeric value. More on this later.
  158.  
  159.      Dn is an optional switch for specifying the number of digits a year
  160.      will occupy. The 'n' represents a numeric value. More on this later.
  161.  
  162.      The default action (where none of the optional switches is selected)
  163.      is as follows:
  164.  
  165.           The exported file is a fixed-length ASCII text file. Fields are
  166.      padded where necessary to full width and records are terminated with a
  167.      carriage return/line feed.
  168.           Alpha fields are padded with spaces to full width, left aligned.
  169.           Numeric fields are output in a 17-character text field, right
  170.      aligned. 15 significant digits are expressed. Decimal alignment does
  171.      not occur; as many decimal places as are needed will be output in the
  172.      field, and this may vary from record to record.
  173.           Dates are output as alphanumeric fields in the form MM/DD/YYYY,
  174.      (10 characters).
  175.           Short fields are output to 6 digits, right aligned.
  176.           Dollar fields are output in a 17-character text field, right
  177.      aligned, including two decimal places. 15 significant digits are
  178.      expressed.
  179.  
  180.      PARADUMP does not recognize primary or secondary indexes. The data
  181.      records are exported in physical (unindexed) order.
  182.  
  183.      When a Paradox table is exported using PARADUMP, an ASCII file with
  184.      the same name as your output file but with an extension of .STR is
  185.      created (so don't use an extension of .STR in your output filename).
  186.      This file contains a listing of the exported table structure. The
  187.      listing includes the field name, the type of field being exported, and
  188.      the width of the field (if a variable-length output option is
  189.      selected, the field width indicates the maximum number of characters
  190.      allowed in the field). Numeric and dollar fields are always 17
  191.      characters wide, but numeric fields can have a variable number of
  192.      digits after the decimal point. The number of decimal places is shown
  193.      in parentheses following the field width. A decimal place value of -1
  194.  
  195.  
  196.  
  197.                                            PARADUMP.DOC REV. 7/18/92 PAGE 3
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.      means that the decimal point floats (that is, it appears in whatever
  207.      position is natural for the numeric value stored in the field). You
  208.      can specify a fixed number of decimal places with the P option,
  209.      explained below.
  210.  
  211. ALTERNATE OUTPUT OPTIONS.
  212.  
  213.      1. CHANGING THE OUTPUT FILE TYPE (the O option).
  214.  
  215.         PARADUMP has the ability to output to several other file types by
  216.         setting the O option (letter Oh, not numeral Zero). The following
  217.         options are available:
  218.  
  219.         O1 - comma/quote-delimited ASCII. Fields are output as variable-
  220.         length text. Each field is surrounded by quote marks, fields are
  221.         separated from one another by a comma. Records are terminated by a
  222.         carriage return/line feed.
  223.  
  224.         O2 - tab-delimited ASCII. Fields are output as variable-length
  225.         text. Fields are separated from one another by a tab character
  226.         (ASCII 9). Records are terminated by a carriage return/line feed.
  227.  
  228.         O3 - WordPerfect 5.1 secondary merge. Fields are output as
  229.         variable-length text. Fields are separated from one another by a
  230.         control-R (ASCII 18) and a carriage return/line feed. Records are
  231.         terminated by a control-E (ASCII 5) and a carriage return/line
  232.         feed.
  233.  
  234.         O4 - comma-delimited ASCII. This is the same as option O1, except
  235.         numeric and dollar fields are not surrounded by quote marks, so
  236.         they can be distinguished from text fields. This format is used
  237.         largely for importing into Lotus 1-2-3 or other spreadsheet
  238.         programs.
  239.  
  240.      2. CHANGING THE DATE FORMAT (the D option).
  241.  
  242.         Dates in PARADUMP are output as text strings in MM/DD/YYYY format
  243.         by default. You can output dates as MM/DD/YY by setting the D
  244.         option to D2. Since a 2-digit year can't differentiate between
  245.         centuries, you'd want to be sure that all of your dates fall within
  246.         the same century if you choose D2.
  247.  
  248.      3. SPECIFYING DECIMAL PLACES (the P option).
  249.  
  250.         Numeric fields by default are output with a floating decimal point
  251.         within a 17-character text field, right aligned (15 significant
  252.         digits are expressed); this means that whole numbers will be output
  253.         with no decimal point at all, and fractional numbers will be output
  254.         to as many decimal places as required. There are instances,
  255.         however, when it is desirable to align the decimal points in a
  256.         field; this requires a fixed number of decimal places to be output.
  257.         The P option allows you to set the number of decimal places for
  258.         each numeric field, in a range from 0 to 7, or specify a floating
  259.         decimal point.
  260.  
  261.  
  262.  
  263.                                            PARADUMP.DOC REV. 7/18/92 PAGE 4
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.         The format of the P option is:
  274.  
  275.         Pn,n,n,n,n,n...
  276.  
  277.         where each 'n' is a number representing the number of decimal
  278.         places to carry in the field. If you use the P option, you must
  279.         specify a value (even if it is a BLANK value) for each and every
  280.         field in the table. If your table contains 10 fields (even if some
  281.         of them are Alpha fields), you must have 10 values in the P option.
  282.         Of course, it is meaningless to assign a decimal place value for an
  283.         Alpha field, but a comma must be used as a field placeholder
  284.         anyway.
  285.  
  286.         For instance, assume that your table contains five fields of the
  287.         following types: Alpha, Numeric, Numeric, Alpha, Dollar. Let's say
  288.         you wanted the first numeric field to be output to 3 decimal
  289.         places, and the second numeric field to be output to 0 decimal
  290.         places. The P option would look like this:
  291.  
  292.         P,3,0,,
  293.  
  294.         The first value is a blank placeholder for the Alpha field, the
  295.         second value is a 3, the third value is a 0, the fourth value is a
  296.         blank placeholder, and the fifth value is a blank placeholder. You
  297.         could also enter any number instead of a blank placeholder; a
  298.         decimal place value will be ignored for non-numeric fields. For
  299.         instance, this P option line:
  300.  
  301.         P8,3,0,1,1
  302.  
  303.         would have the same effect as the previous one, since only the
  304.         second and third fields in the Paradox table are Numeric fields.
  305.         (Remember that Dollar fields are always output to two decimal
  306.         places.)
  307.  
  308.         A value of -1 is used to indicate a floating decimal point (which
  309.         is the default). Thus, you can mix fixed-place decimals with
  310.         floating-place decimals in the same record.
  311.  
  312.         IMPORTANT NOTE!
  313.         The P option has a special characteristic that affects all numeric
  314.         fields: THE LAST SPECIFIED VALUE IN THE P OPTION WILL AFFECT ALL
  315.         SUBSEQUENT NUMERIC FIELDS. For instance, if you had a P option that
  316.         looked like this:
  317.  
  318.         P4
  319.  
  320.         ...every numeric field in the table would be output to four decimal
  321.         places. As another example, assume you have a Paradox table that
  322.         has fields of the following types: Alpha, Alpha, Numeric, Date,
  323.         Numeric, Numeric, Numeric, Numeric, Numeric. If you had a P option
  324.         that looked like this:
  325.  
  326.  
  327.  
  328.  
  329.                                            PARADUMP.DOC REV. 7/18/92 PAGE 5
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.         P,,2,,3
  339.  
  340.         ...the first Numeric field would be output to two decimal places,
  341.         and the second and all subsequent Numeric fields would be output to
  342.         three decimal places. If we change the P option to this:
  343.  
  344.         P,,2,,3,-1
  345.  
  346.         ...the first and second Numeric fields will be output to two and
  347.         three decimal places, respectively, and the third and subsequent
  348.         numeric fields will be output with a floating decimal point.
  349.  
  350.         Try experimenting with the P option. Play around with different P
  351.         values to get a good idea of how the P option affects your output.
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.                                            PARADUMP.DOC REV. 7/18/92 PAGE 6
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.                              REGISTRATION FORM
  405.  
  406. DATE: ________________________
  407.  
  408.  
  409. NAME: __________________________________________________________________
  410.  
  411. COMPANY: _______________________________________________________________
  412.  
  413. ADDRESS: _______________________________________________________________
  414.  
  415.          _______________________________________________________________
  416.  
  417. CITY: _______________________________ STATE: _______  ZIP: _____________
  418.  
  419. PHONE: _____________________________ FAX: ______________________________
  420.  
  421.  
  422. FEE SCHEDULE                                    QTY              AMOUNT
  423.  
  424. REGISTRATION FOR PARADUMP 1.05 @ $25 PER COPY ________ x $25 = _________
  425.  
  426. SITE LICENSE FOR STAND-ALONE UNITS
  427.  
  428.      5 - 10 UNITS @ $15 PER COPY              ________ x $15 = _________
  429.  
  430.      11 - 20 UNITS @ $10 PER COPY             ________ x $10 = _________
  431.  
  432.      OVER 20 UNITS @ $5 PER COPY              ________ x $ 5 = _________
  433.  
  434. NETWORK FILE SERVER REGISTRATION
  435.  
  436.      <=20 WORKSTATIONS @ $50/FILE SERVER      ________ x $50 = _________
  437.  
  438.      >20 WORKSTATIONS @ $100/FILE SERVER      ________ x $100= _________
  439.  
  440. SHIPPING AND HANDLING (INDICATE ANY THAT APPLY)
  441. (For single copies only; call for S/H on multiple copies)
  442.  
  443.      FIRST CLASS MAIL                                          ___$5.00_
  444.      UPS GROUND                                                ____7.50_
  445.      OVERNIGHT DELIVERY                                        ___20.00_
  446.      C.O.D.                                              ADD   ____7.50_
  447.  
  448.  
  449.                                    TOTAL      ________         _________
  450. Send this form with payment to:
  451.  
  452.                Thomas A. Lundin
  453.                16267 Hudson Avenue
  454.                Lakeville, MN 55044
  455.  
  456. Payment terms are Prepaid or C.O.D.
  457. Corporate purchase orders accepted from Fortune 1000 firms only.
  458.  
  459.  
  460.  
  461.                                            PARADUMP.DOC REV. 7/18/92 PAGE 7
  462.  
  463.