home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 16 / 16.iso / t / t206 / 1.img / DELIMIT.TXT < prev    next >
Encoding:
Text File  |  1993-10-23  |  63.7 KB  |  1,788 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.                                     D E L I M I T
  18.  
  19.                               A File Conversion Utility
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.                             Copyright 1993 Roy G Grosbach
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.                                       April 1993
  51.  
  52.  
  53.                                      Version 3.27
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.           TABLE OF CONTENTS
  61.  
  62.  
  63.           WHAT IS SHAREWARE . . . . . . . . . . . . . . . . . . . . . .   3
  64.  
  65.           Why DELIMIT . . . . . . . . . . . . . . . . . . . . . . . . .   3
  66.               _______
  67.  
  68.           History of DELIMIT  . . . . . . . . . . . . . . . . . . . . .   4
  69.                      _______
  70.  
  71.           FUTURE ENHANCEMENTS . . . . . . . . . . . . . . . . . . . . .   5
  72.  
  73.           QUICK REFERENCE . . . . . . . . . . . . . . . . . . . . . . .   6
  74.  
  75.           Parameter File Format . . . . . . . . . . . . . . . . . . . .   8
  76.                Record Selection . . . . . . . . . . . . . . . . . . . .   8
  77.                     Header Parm . . . . . . . . . . . . . . . . . . . .   8
  78.                     Detail Parm . . . . . . . . . . . . . . . . . . . .   8
  79.                Comment  . . . . . . . . . . . . . . . . . . . . . . . .   8
  80.                File Format: . . . . . . . . . . . . . . . . . . . . . .   9
  81.                     Output File . . . . . . . . . . . . . . . . . . . .   9
  82.                          Separator Parm . . . . . . . . . . . . . . . .   9
  83.                          Record Separator Parm  . . . . . . . . . . . .   9
  84.                     Input file  . . . . . . . . . . . . . . . . . . . .   9
  85.                          Length parm  . . . . . . . . . . . . . . . . .   9
  86.                Data Selection . . . . . . . . . . . . . . . . . . . .    10
  87.                     Character Parm  . . . . . . . . . . . . . . . . .    10
  88.                     Move Parm . . . . . . . . . . . . . . . . . . . .    10
  89.                     Number Parm . . . . . . . . . . . . . . . . . . .    11
  90.                     Signed Numeric Parm . . . . . . . . . . . . . . .    11
  91.  
  92.           EXAMPLES  . . . . . . . . . . . . . . . . . . . . . . . . .    12
  93.                BANK1.PAR  . . . . . . . . . . . . . . . . . . . . . .    13
  94.                BANK2.PAR  . . . . . . . . . . . . . . . . . . . . . .    17
  95.                DATE1.PAR  . . . . . . . . . . . . . . . . . . . . . .    20
  96.                DATE2.PAR  . . . . . . . . . . . . . . . . . . . . . .    22
  97.                DATE2MAC.PAR . . . . . . . . . . . . . . . . . . . . .    25
  98.  
  99.           DISCLAIMER - AGREEMENT  . . . . . . . . . . . . . . . . . .    27
  100.  
  101.           SOFTWARE SUPPORT  . . . . . . . . . . . . . . . . . . . . .    28
  102.  
  103.           HARDWARE REQUIREMENTS . . . . . . . . . . . . . . . . . . .    28
  104.  
  105.           REGISTRATION FORM . . . . . . . . . . . . . . . . . . . . .    29
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.                                           2
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.           WHAT IS SHAREWARE?
  126.  
  127.           Shareware distribution gives users a chance to try software
  128.           before buying it. If you try a Shareware program and continue
  129.           using it, you are expected to register.  Individual programs
  130.           differ on details -- some request registration while others
  131.           require it, some specify a maximum trial period.  With
  132.           registration, you get anything from the simple right to continue
  133.           using the software to an updated program with printed manual.
  134.  
  135.           Copyright laws apply to both Shareware and commercial software,
  136.           and the copyright holder retains all rights, with a few specific
  137.           exceptions as stated below.  Shareware authors are accomplished
  138.           programmers, just like commercial authors, and the programs are
  139.           of comparable quality.  (In both cases, there are good programs
  140.           and bad ones!)  The main difference is in the method of
  141.           distribution.  The author specifically grants the right to copy
  142.           and distribute the software, either to all and sundry or to a
  143.           specific group.  For example, some authors require written
  144.           permission before a commercial disk vendor may copy their
  145.           Shareware.
  146.  
  147.           Shareware is a distribution method, not a type of software.  You
  148.           should find software that suits your needs and pocketbook,
  149.           whether it's commercial or Shareware.  The Shareware system makes
  150.           fitting your needs easier, because you can try before you buy.
  151.           And because the overhead is low, prices are low also.  Shareware
  152.           has the ultimate money-back guarantee -- if you don't use the
  153.           product, you don't pay for it.
  154.  
  155.  
  156.           Why DELIMIT?
  157.               _______
  158.  
  159.           DELIMIT converts fixed format files into DELIMITed files, that
  160.           _______
  161.           data bases and spread sheets can read quickly.  DELIMIT filters
  162.                                                           _______
  163.           the file, choosing selected fields, eliminating headers from
  164.           reports, or selecting only summary lines from reports.  DELIMIT
  165.                                                                   _______
  166.           can also choose selected fields from fixed-format files easily.
  167.  
  168.           Spread sheets can also parse fixed format files, but not as
  169.           quickly as DELIMIT.  DELIMIT can remove header records, or select
  170.                      _______   _______
  171.           detail records, spread sheets can not do this, it must be done
  172.           manually.
  173.  
  174.           Data bases can read fixed format files, but can not choose
  175.           selected fields.  This must be done either manually or by writing
  176.           a program.  A program can be written to exclude headers, or
  177.           include summary records - but building a DELIMIT parameter (parm)
  178.                                                    _______
  179.           file is faster and easier than writing an entire program.
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.                                           3
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.           Microsoft Windows users can cut and paste data from a fixed
  196.           format file, or from a report file, but this is slow and tedious.
  197.           If you need to do more than several screens worth of data,
  198.           building a DELIMIT parm file is faster and easier, because you
  199.                      _______
  200.           are replacing the cut & paste process.  Once the parm file is
  201.           created it can be used next time you need data from that report
  202.           again.
  203.  
  204.  
  205.           History of DELIMIT
  206.                      _______
  207.  
  208.           DELIMIT was created when a friend needed to do some budget
  209.           _______
  210.           analysis.  The accounting reports were 100 pages long, and we
  211.           needed to get the department totals into a spread sheet for
  212.           analysis.  There were 3 choices:
  213.             1) Ask the computer operators to create an ad hoc report in a
  214.                difficult to use report writing system, and import it into
  215.                the spread sheet.  They were back logged, so it would have
  216.                taken a couple of weeks, (and the next time the requirements
  217.                would have been different, and we would have to wait weeks
  218.                again.)
  219.             2) Import the entire report into the spread sheet, and delete
  220.                the detail records.  (the spread sheet couldn't handle that
  221.                many lines).
  222.             3) Use a text editor to delete the detail lines, and then
  223.                import it into the spread sheet.  This would have been very
  224.                tedious!
  225.  
  226.           We tested parsing 1 page of the accounting report in a spread
  227.           sheet program.  Reading the text file was quick, but parsing it
  228.           took a long time - it would have literally taken HOURS to parse
  229.           the hundred pages of data we needed.  We didn't need all the
  230.           columns that were included on the report anyway.
  231.  
  232.           DELIMIT v1.00 was created.  We could INCLUDE the records we
  233.           _______
  234.           wanted and ignore the rest (Detail parm).  We could also select
  235.           the columns we wanted and ignore the others.  The data was either
  236.           text - surrounded by double quotes, (Character parm) or numbers
  237.           (Number parm).  What would have taken hours to parse took just a
  238.           few minutes using DELIMIT.  The spread sheet program could read
  239.                             _______
  240.           the text file quickly, and the time consuming parse was not
  241.           needed.
  242.  
  243.           Several weeks later, we needed to do the same thing, but wanted
  244.           all the detail records for a 20 page section of the report, not
  245.           just the totals.  There was no unique way to identify the detail
  246.           records, but we could identify the records we didn't want.  This
  247.           is when the Header parm was added, to select records to EXCLUDE
  248.           from the processing, and process the rest.
  249.  
  250.           Somewhere along the line, someone else needed to DELIMIT a file,
  251.                                                            _______
  252.           but their destination program didn't want text surrounded by
  253.           double quotes.  This is when the Move parameter was created, to
  254.           select the text, but not surround it with double quotes.
  255.  
  256.                                           4
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.           Another person saw this and said, "this is great!, but why do I
  264.           have to print the report first, why can't I just copy the data
  265.           file from the mini computer?"  This represented a two changes.
  266.           The first change was that the source file was no longer a report.
  267.           The data file from the mini was fixed format, with NO record
  268.           separators.  This is when the Length parm was created, to be able
  269.           to read files with no record separators.  The second problem was
  270.           that the records were longer than 255 characters.  The input
  271.           buffers can now work with records up to 4000 bytes.
  272.  
  273.           During another project, we needed to bring a data file from a
  274.           main frame tape, to a Macintosh (Mac).  The Mac doesn't
  275.           understand comma delimited files, it doesn't like double quotes
  276.           or Carriage Return - Line Feed (CR-LF) for the record separator
  277.           either.  This produced the Separator parm, to be able to use any
  278.           other character (or string) as a field separator.  This also
  279.           produced the Record separator parm, in able to use any other
  280.           character (or string) as the record separator.
  281.  
  282.           After explaining the program to someone, they said, "how can you
  283.           understand what all those parm files mean?".  This lead to the *
  284.           comment parm, so parm files can be documented.
  285.  
  286.           The latest project has been to acquire data from many diverse
  287.           sources, and import it into a data base.  One mainframe source
  288.           could only supply data on large reel tape.  The numeric fields
  289.           were signed (the last position not a number it is a letter).
  290.           This produced the Signed Numeric field.
  291.  
  292.           It is faster to create one import program, and many DELIMIT parm
  293.                                                               _______
  294.           files to create the format we need, than to continue to write new
  295.           import programs for the data base.  Also the research analysts
  296.           don't want to program, but they love to DELIMIT.
  297.                                                   _______
  298.  
  299.  
  300.           FUTURE ENHANCEMENTS
  301.  
  302.             -  A constant parm, to add 'constant' data to every record.
  303.                During one project, data is reformatted from a fixed format
  304.                file to be imported into a spread sheet.  For formatting
  305.                purposes, the user wants to create blank columns.  Currently
  306.                we just select an area we know will be blank to give the
  307.                empty field.
  308.  
  309.             -  A record count parm.  Some data by its nature does not have
  310.                unique keys.  A record count parm could be used to create
  311.                unique keys.  Some data bases require a unique key for
  312.                storage reasons.
  313.  
  314.             -  A prettier user interface.
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.                                           5
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.           QUICK REFERENCE
  329.  
  330.           Program        DELIMIT
  331.           Environment    DOS, Turbo Pascal 3.0 - 7.0
  332.           Author         Roy Grosbach
  333.           Copyright      Copyright 1987-1993 Roy Grosbach
  334.           Date           DELIMIT V3.27 TP7.0 04/25/93
  335.  
  336.           Some of DELIMIT's MANY uses:
  337.                   _______
  338.  
  339.             -  Convert a print file (report printed to disk) to a file to be
  340.                read into a spread sheet or data base (remove the report headers
  341.                and convert numbers).
  342.  
  343.             -  Convert a fixed format file to a comma (or tab) delimited file.
  344.  
  345.             -  Extract selected fields (i.e. totals from a print file, to be
  346.                read into a spread sheet or data base, disregard all other
  347.                fields).
  348.  
  349.             -  Extract selected fields from a fixed record format (mainframe
  350.                data base) for importing to a data base.
  351.  
  352.             -  Extract selected fields from a fixed format file and create a
  353.                smaller fixed format file.
  354.  
  355.             -  Reformat a fixed format file into a different fixed format file.
  356.                (data conversion from one system to another).
  357.  
  358.           The Numeric fields in comma (or tab) delimited files are expected NOT
  359.           to have commas or other non numeric characters.  The negative sign is
  360.           expected to be in the first position of the field.  Many reports use a
  361.           negative sign at the last position of the field,  DELIMIT will move it
  362.                                                             _______
  363.           to the front.  Other reports use parenthesis to inclose negative
  364.           amounts, which DELIMIT removes, and places a negative sign in the
  365.                          _______
  366.           first position.
  367.  
  368.           Text fields may be moved as is (Move parameter), or surrounded by
  369.           double quotes (Character parameter).
  370.  
  371.           Fields are separated by commas, or by a user defined character,
  372.           (Separator parameter) or by nothing.  IF fields are separated by NO
  373.           character, the fields are fixed format.  IF fields are separated by
  374.           any 'separator', extra spaces are trimmed from the fields.
  375.  
  376.           Records (lines) are separated by CR-LF (Carriage Return-Line Feed), by
  377.           a user defined character (Record separator parameter), or by nothing.
  378.  
  379.           Command line:
  380.             DELIMIT <parmfile> <input file> <output file>
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.                                              6
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.           QUICK REFERENCE
  395.  
  396.           Valid PARAMETER TYPES
  397.           * - comment    *    All text is ignored.
  398.  
  399.           H - Header     H    <position> <length> <text>    {comments}
  400.                     text to be excluded (all lines that match are excluded from
  401.                     conversion).  Up 10 Headers parms.
  402.  
  403.           D - Detail     D    <position> <length> <text>    {Comments}
  404.                     text to be included (ONLY records that match are converted).
  405.                     Up to 10 Detail parms.
  406.  
  407.           N - Numeric    N    <position> <length>           {Comments}
  408.                     Leading zeros and commas are removed.  Formatting for
  409.                     negative numbers is removed and a '-' placed at the
  410.                     beginning of the field.  IF the field separator is Snone or
  411.                     Rnone, then spaces are included to right justify the field.
  412.  
  413.           @ - Signed Numeric  @    <position> <length>      {Comments}
  414.                     Signed fields from the mainframe replace the LAST position
  415.                     with a character that represents the number AND the sign
  416.                     (positive or negative).  Leading zeros are removed.  IF the
  417.                     field separator is Snone or Rnone, then spaces are included
  418.                     to right justify the field.
  419.  
  420.           C - Character  C    <position> <length>           {Comments}
  421.                     Surrounds field with double quotes.  Trailing blanks are
  422.                     removed.
  423.  
  424.           M - Move       M    <position> <length>           {Comments}
  425.                     Does not surround with quotes, trailing spaces are removed.
  426.                     IF the field separator is Snone or Rnone, then trailing
  427.                     spaces are NOT removed.
  428.  
  429.           L - Length     L    <length>                      {Comments}
  430.                     Length of fixed records (that have no CR-LF).  Sometimes
  431.                     data files from main frames have no end of record marker.
  432.                     Can be up to 4000.
  433.  
  434.           S - Separator  S<separator between fields>
  435.                     Change the field separator from a comma to something else.
  436.  
  437.                **   must NOT have a space between the 'S' and the separator
  438.                          S\nnn - nnn = ASCII code
  439.  
  440.           R - Record Sep R<separator between records>
  441.                     Change the record separator from a CR-LF to something else.
  442.  
  443.                **   must NOT have a space between the 'R' and the separator
  444.                          R\nnn - nnn = ASCII code
  445.  
  446.                **   NOTE Snone or Rnone replaces the separator with NOTHING!
  447.  
  448.  
  449.  
  450.                                           7
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.           Parameter File Format
  459.  
  460.           There are four basic types of parameters (parms), Record Selection,
  461.           File Format, Data Selection, and Comments.  The Record Selection parms
  462.           and Data Selection parms need to know the position, and length of a
  463.           field.  The Record selection parms also need to know the position and
  464.           length of a string, to compare with it's "matching string" field.  The
  465.           File Format parms provide new separator characters for the output
  466.           file, and the length parm denotes if the input file has no record
  467.           separators.  The Comment allows the user to document the parm file.
  468.  
  469.           A.   Record Selection:
  470.                Header Parm:
  471.                     Identifies records to be excluded (don't use a record if it
  472.                     matches one of these strings).  There may be up to 10 header
  473.                     parms in a parm file, and they may appear in any order in
  474.                     the file.
  475.  
  476.                Format:
  477.                     H <position> <length> <String to compare> {comments}
  478.  
  479.  
  480.                Detail Parm:
  481.                     Identifies records to be included (use ONLY the records that
  482.                     match one of these strings).  There may be up to 10 detail
  483.                     parms in a parm file, and they may appear in any order in
  484.                     the file.
  485.  
  486.                Format:
  487.                     D <position> <length> <String to compare>  {comments}
  488.  
  489.           B.   Comment:
  490.                Any line in the parm file that begins with a '*' is considered a
  491.                comment, and is ignored.
  492.  
  493.                Format:
  494.                     *
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.                                              8
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.           C.   File Format:   Output File:
  521.                Separator Parm:
  522.                     This defines the field separators.  The default field
  523.                     separator is a comma.  Only one Field Separator is allowed
  524.                     per parm file, and it may appear anywhere in the file.
  525.  
  526.                Format:
  527.                     Snone
  528.                          Snone will allow you to have NO field separators.  This
  529.                          is useful when you are reformatting a file, or need to
  530.                          create a fixed format file.  The MOVE and NUMBER parms
  531.                          will NOT remove leading or trailing spaces when Snone
  532.                          is selected, they will when any other record separator
  533.                          is selected.
  534.  
  535.                     S\nnn\nnn...
  536.                          Where \nnn are ASCII character codes.
  537.  
  538.                     S\009
  539.                          To use a TAB for a separator (useful for the Macintosh)
  540.  
  541.  
  542.                Record Separator Parm:
  543.                     This defines the record separators.  The default record
  544.                     separator is a CR-LF.  Only one Record Separator parm is
  545.                     allowed per parm file, and it may appear anywhere in the
  546.                     file.
  547.  
  548.                Format:
  549.                     Rnone
  550.                          Rnone will allow you to have NO record separators.
  551.                          This is useful when you are reformatting a file for a
  552.                          computer system that does not want record separators.
  553.                          The MOVE and NUMBER parms will NOT remove leading or
  554.                          trailing spaces when Rnone is selected, they will when
  555.                          any other record separator is selected.
  556.  
  557.                     R\nnn\nnn...
  558.                          Where \nnn are the ASCII codes of characters.
  559.                     R\013
  560.                          To use a CR for a separator (useful for a Macintosh)
  561.  
  562.  
  563.           Input file:
  564.                Length parm:
  565.                     This is used to define the length of a fixed format file
  566.                     that does NOT have record separators.  Some computer files
  567.                     do not have record separators.
  568.  
  569.                Format:
  570.                     L n  Where n is an integer less than or equal to 4000.
  571.  
  572.  
  573.  
  574.  
  575.  
  576.                                              9
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.           D.   Data Selection:
  584.                There may be up to 255 Data Selection parms.  The order of the
  585.                fields in the output file is determined by the order of the parms
  586.                in the parm file (i.e. the first Data Selection parm will be the
  587.                first field in the output file).  The field is based on the
  588.                position, and the length of the field desired.  <length>
  589.                characters are copied, starting at <position>.
  590.  
  591.                NO error checking is done on the input fields.  If an input line
  592.                is shorter than the expected position of a field, the field is
  593.                ignored, and no delimiter is added.  Characters are processed as
  594.                is - the 'correctness' of the output file is the responsibility
  595.                of the user.  The user must insure that the position and length
  596.                fields are correct.  DELIMIT does not generate any warning
  597.                                     _______
  598.                messages.
  599.  
  600.  
  601.                Character Parm:
  602.                     The field is surrounded by double quotes.  Trailing spaces
  603.                     in the field are removed.
  604.  
  605.                Format:
  606.                     C <position> <length>    {Comment}
  607.  
  608.  
  609.                Move Parm:
  610.                     The field is NOT surrounded by double quotes.  Trailing
  611.                     spaces are removed.  IF the record separator is RNONE, then
  612.                     trailing spaces are NOT removed (so you can build fixed
  613.                     format files).
  614.  
  615.                Format:
  616.                     M <position> <length>    {Comment}
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.                                             10
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.                Number Parm:
  648.                     The field is reformatted.  All non-numeric characters are
  649.                     removed, commas are removed - because they are normally
  650.                     considered field separators in text files. Formatting for
  651.                     negative numbers are eliminated:  A trailing '-' is moved to
  652.                     the beginning of the field.  A field surrounded by brackets
  653.                     '()' has a '-' placed at the beginning of the field.  IF the
  654.                     record separator is RNONE, the field is LEFT filled with
  655.                     leading spaces (so you can build fixed format files).
  656.  
  657.                     If other non-numeric characters are found, DELIMIT DOES NOT
  658.                                                                _______
  659.                     report an error.  It is up to the user to make sure the
  660.                     field is defined correctly.
  661.  
  662.                Format:
  663.                     N <position> <length>    {Comment}
  664.  
  665.  
  666.                Signed Numeric Parm:
  667.                     Signed Numeric data comes from mainframes.  The sign AND the
  668.                     value is contained in the last byte of the field.  "A" is a
  669.                     positive 1, "B" is a positive 2 and so on.  The signed
  670.                     numeric parm does all the same reformatting as the Number
  671.                     parm, AND the conversion of the last byte.
  672.  
  673.                     The field is reformatted.  All non-numeric characters are
  674.                     removed, commas are removed - because they are normally
  675.                     considered field separators in text files. Formatting for
  676.                     negative numbers are eliminated:  The last byte is
  677.                     translated.  If it is negative, a '-' is placed at the
  678.                     beginning of the field.  IF the record separator is RNONE,
  679.                     the field is LEFT filled with leading spaces (so you can
  680.                     build fixed format files).
  681.  
  682.                     If other non-numeric characters are found, DELIMIT DOES NOT
  683.                                                                _______
  684.                     report an error.  It is up to the user to make sure the
  685.                     field is defined correctly.
  686.  
  687.                Format:
  688.                     @ <position> <length>    {Comment}
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.                                             11
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.           EXAMPLES
  713.  
  714.           The examples are designed to demonstrate the functionality of DELIMIT. 
  715.                                                                         _______
  716.           The following examples can be seen by running the corresponding .BAT
  717.           files.
  718.  
  719.  
  720.           1.   Using the Heading Parm.
  721.                In this example we will extract fields from a printed report
  722.                (printed to disk).  We want to EXCLUDE the report headings.
  723.                EX1.BAT                                                 BANK1.PAR
  724.                EX1.BAT                                                 BANK1.PAR
  725.  
  726.           2.   Using the Detail Parm.
  727.                In this example we will extract fields from a printed report
  728.                (printed to disk).  We will use the same input file as example
  729.                number one, but we will INCLUDE just the detail lines.
  730.                EX2.BAT                                                 BANK2.PAR
  731.                EX2.BAT                                                 BANK2.PAR
  732.  
  733.           3.   Reformatting a fixed format file.  Field separator is None.
  734.                In this example we will reformat the date field of a fixed format
  735.                record (from YY/MM/DD to MM/DD/YY).  We will leave the rest of
  736.                the record in the same format for later processing.
  737.                EX3.BAT                                                 DATE1.PAR
  738.                EX3.BAT                                                 DATE1.PAR
  739.  
  740.           4.   Convert a fixed format record into a comma delimited file.
  741.                We will take selected fields from a fixed format record, and
  742.                convert it into a comma delimited file.  This example uses the
  743.                output of example 3 as the input of this example.
  744.                EX4.BAT                                                 DATE2.PAR
  745.                EX4.BAT                                                 DATE2.PAR
  746.  
  747.           5.   Macintosh Example.
  748.                The Macintosh computer uses TABs to separate fields, and a CR
  749.                (not CR-LF) to separate records.  We will use the output file
  750.                created in example 3 as the input of this example.
  751.                EX5.BAT                                              DATE2MAC.PAR
  752.                EX5.BAT                                              DATE2MAC.PAR
  753.  
  754.           6.   Creating files with no record separators.
  755.                This example shows how DELIMIT can create files with no record
  756.                                       _______
  757.                separators.  We will use the input file from example 3 and
  758.                convert it into a file with no record separators.
  759.                EX6.BAT                                                 DATE6.PAR
  760.                EX6.BAT                                                 DATE6.PAR
  761.  
  762.           7.   Reading Files with no record separators.
  763.                We will extract selected fields from the file without record
  764.                separators created in example 6.  Our output file will be TAB
  765.                delimited.
  766.                EX7.BAT                                                 DATE7.PAR
  767.                EX7.BAT                                                 DATE7.PAR
  768.  
  769.  
  770.           Examples 6 and 7 are not in the printed documentation.  The files are
  771.           provided on the distribution disk.
  772.  
  773.  
  774.  
  775.  
  776.  
  777.                                             12
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.      Example 1.  BANK1.PAR
  785.  
  786.      You work at a bank, and you need to do some analysis on the Adjustable Rate
  787.      Mortgages that your banking software does not perform.  You have several
  788.      options:
  789.           1)   key in the data you need.
  790.           2)   open a terminal session to your banking system, and cut & paste
  791.                the data.  If the data is not in the proper order, or the block
  792.                is large, this is a very tedious process.
  793.           3)   Use DELIMIT.  If you do this analysis more than once, then the
  794.                    _______
  795.                work is done for you for the second time.
  796.  
  797.      What do we need to do to the ARM (Adjustable Rate Mortgage) report to move
  798.      the data into a spread sheet?
  799.        -  Remove the report headings
  800.        -  Identify the account number, branch number, change of rate, and
  801.           remaining balance.
  802.  
  803.      There are two ways to identify the report headings and the data fields:
  804.           1)   Print the first page of the report, and use a forms ruler to
  805.                calculate the positions and lengths of the fields.
  806.           2)   Open BANK.TXT with a text editor or word processor that can read
  807.                and write text files and display the position of the cursor so we
  808.                can determine the length of headers, and fields we want to
  809.                capture.  If your editor can have multiple windows open, you can
  810.                jump back and forth between the data file window and the parm
  811.                file window to create your parm file.
  812.  
  813.                The parm file must be a plain ASCII file, most word processors
  814.                can create a plain ASCII file.
  815.  
  816.      INPUT FILE:         BANK.TXT
  817.  
  818.  
  819.  INT110                       FIRST NATIONAL BANK                      PAGE   1
  820.  TIME 19:25              ADJUSTABLE RATE MORTGAGE CHANGES         DATE 12/31/87
  821.  
  822.  ACCOUNT  BR NAME                  MATURE     OLD    CHANGE   NEW      BALANCE
  823.                                               RATE            RATE
  824.  
  825.  123456   01 MYRON MYERS         12/31/2001  10.250  0.250-  10.000   40,392.25
  826.  123847   02 SUSAN SMITH         12/31/1999  11.500  0.250-  11.250   85,934.65
  827.  129087   02 JOHN Q PUBLIC       08/31/2006   9.785  0.215   10.000   36,900.98
  828.  138264   03 ANDREW ANDERSON     01/31/2010   8.375  0.250    8.626  135,968.99
  829.  149821   03 PAUL PUBLIC         07/30/1998  13.250  0.250-  13.000   56,654.15
  830.  298743   04 LEWIS LEAPYEAR      02/29/2004  12.500  0.250-  12.250   12,125.54
  831.  
  832.  
  833.                             E N D   O F   R E P O R T
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.                                           13
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.      First, identify this Parm file, so others can easily identify what we are
  849.      trying to do.  Build a 'flower box' of asterisks, and copy in the first
  850.      several lines of the report.  Then add some text describing what we intend
  851.      to do.
  852.  
  853. ********************
  854. *INT110                       FIRST NATIONAL BANK                      PAGE   1
  855. *TIME 19:25              ADJUSTABLE RATE MORTGAGE CHANGES         DATE 12/31/87
  856. ********************
  857. *EXAMPLE BANK1.PAR
  858. *  Ignore the headers
  859. *  Extract the Account number, Branch, Interest rate change,
  860. *              new interest rate and the loan balance.
  861. ********************
  862.  
  863.      We need to identify every heading line so we can eliminate them.  The first
  864.      line can be identified by the word PAGE.  PAGE will probably be in the same
  865.      position for EVERY report generated by this banking system.  PAGE is
  866.      located at the 71st position of the print line, and is 4 characters long.
  867.      Add the line  "H   71  4 PAGE" to the parameter file.
  868.  
  869.  
  870.  INT110                       FIRST NATIONAL BANK                      PAGE   1
  871.  
  872.  
  873.      The second header line can be identified by the word TIME.  Just as with
  874.      PAGE, TIME will probably be in the same position for EVERY report generated
  875.      by this system.  TIME is located in the 1st position of the print line and
  876.      is 4 characters long.
  877.      Add the line "H   1   4  TIME" to the parameter file.
  878.  
  879.  
  880.  TIME 19:25              ADJUSTABLE RATE MORTGAGE CHANGES         DATE 12/31/87
  881.  
  882.  
  883.  
  884.      The third header line can be uniquely identified by the word "ACCOUNT".  It
  885.      is located at the 1st position of the print line and is 7 characters long.
  886.      Add the line "H   1  7 ACCOUNT" to the parameter file.
  887.  
  888.  
  889.  ACCOUNT  BR NAME                  MATURE     OLD    CHANGE   NEW      BALANCE
  890.  
  891.  
  892.      The fourth header line can be identified by the word RATE.  RATE is located
  893.      in the 46th position of the print line and is 4 characters long.
  894.      Add the line "H  46  4 RATE" to the parameter file.
  895.  
  896.  
  897.                                               RATE            RATE
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.                                           14
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.      We must not forget the footer on the report.  If it is not identified, then
  912.      this line will also be processed, with unforeseen consequences.  In this
  913.      case it would be a record with blank numeric fields.  To identify a unique
  914.      sequence of characters we can select the entire phrase:
  915.      "E N D   O F   R E P O R T".
  916.  
  917.      The footer is located at the 28th character of the print line and is 25
  918.      characters long.
  919.      Add the line "H  28 25 E N D   O F   R E P O R T" to the parameter file.
  920.  
  921.  
  922.                             E N D   O F   R E P O R T
  923.  
  924.  
  925.      Now we are ready to identify the data we want for further analysis.
  926.  
  927.      The first field is the Account Number.  The Account Number is numeric, but
  928.      it could also have characters in the field, so we should treat it as a
  929.      character field.  Also, a N parm would remove leading zeros.  Account
  930.      Number begins in the 1st column of the print file.  Currently the Account
  931.      Number is 6 characters, but it could grow to be 7 characters.  Add the line
  932.      "C   1  7 Account Number" to the parameter file.
  933.      ("Account Number" is treated as additional comments)
  934.  
  935.      The second field is the branch.  Branch could also have non-numeric data in
  936.      it so treat it as a character field.  The Branch begins in the 10th
  937.      position on the print line and is 2 characters long.
  938.      Add the line "C  10  2 Branch" to the parameter file.
  939.  
  940.      The third field we want is the Change field.  It will ONLY be numeric, and
  941.      the negative sign must be moved to the beginning of the field.  Change
  942.      starts at position 53 and is 6 characters long (including the negative
  943.      sign).
  944.      Add the line "N  53  6 change" to the parameter file.
  945.  
  946.      The fourth field is the New Rate field.  It starts at position 61 and is 6
  947.      characters long.
  948.      Add the line "N  61  6 new rate" to the parameter file.
  949.  
  950.      The last field is the remaining Balance field.  Leading spaces will be
  951.      ignored by numeric fields.  Be sure to define the field to get the largest
  952.      amounts.  To do this, the balance field starts at position 69 of the print
  953.      line and is 10 characters long.
  954.      Add the line "N  69 10 balance" to the parameter file.
  955.  
  956.     1      2                                           3       4         5
  957.  
  958.  123456   01 MYRON MYERS         12/31/2001  10.250  0.250-  10.000   40,392.25
  959.  123847   02 SUSAN SMITH         12/31/1999  11.500  0.250-  11.250   85,934.65
  960.  129087   02 JOHN Q PUBLIC       08/31/2006   9.785  0.215   10.000   36,900.98
  961.  138264   03 ANDREW ANDERSON     01/31/2010   8.375  0.250    8.625  135,968.99
  962.  149821   03 PAUL PUBLIC         07/30/1998  13.250  0.250-  13.000   56,654.15
  963.  298743   04 LEWIS LEAPYEAR      02/29/2004  12.500  0.250-  12.250   12,125.54
  964.  
  965.  
  966.  
  967.                                           15
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.      PARAMETER FILE:     BANK1.PAR
  975.  
  976. ********************
  977. *INT110                       FIRST NATIONAL BANK                      PAGE   1
  978. *TIME 19:25              ADJUSTABLE RATE MORTGAGE CHANGES         DATE 12/31/87
  979. ********************
  980. *EXAMPLE BANK1.PAR
  981. *  Ignore the headers
  982. *  Extract the Account number, Branch, Interest rate change,
  983. *              new interest rate and the loan balance.
  984. ********************
  985. H  71  4 PAGE
  986. H   1  4 TIME
  987. H   1  7 ACCOUNT
  988. H  46  4 RATE
  989. H  28 25 E N D   O F   R E P O R T
  990. M   1  6 Account number
  991. M  10  2 Branch
  992. N  53  6 change
  993. N  61  6 new rate
  994. N  69 10 balance
  995. Snone
  996.  
  997.  
  998.  
  999.      OUTPUT FILE:        BANK1.OUT
  1000.  
  1001. 12345601 -.25010.000  40392.25
  1002. 12384702 -.25011.250  85934.65
  1003. 12908702  .21510.000  36900.98
  1004. 13826403  .250 8.626 135968.99
  1005. 14982103 -.25013.000  56654.15
  1006. 29874304 -.25012.250  12125.54
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.                                           16
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.      Example 2.  BANK2.PAR
  1038.  
  1039.      Example 2 uses the same input file as example 1.  Instead of using the
  1040.      Header parm to exclude header records, it uses the Detail parm to include
  1041.      only the detail lines to process.  We can identify the detail lines by the
  1042.      fact they all have a maturity date.  The date field always has a '/' at a
  1043.      particular place.  No other line in the file has a slash in that position.
  1044.  
  1045.      INPUT FILE:         BANK.TXT
  1046.  
  1047.  
  1048.  INT110                       FIRST NATIONAL BANK                      PAGE   1
  1049.  TIME 19:25              ADJUSTABLE RATE MORTGAGE CHANGES         DATE 12/31/87
  1050.  
  1051.  ACCOUNT  BR NAME                  MATURE     OLD    CHANGE   NEW      BALANCE
  1052.                                               RATE            RATE
  1053.  
  1054.  123456   01 MYRON MYERS         12/31/2001  10.250  0.250-  10.000   40,392.25
  1055.  123847   02 SUSAN SMITH         12/31/1999  11.500  0.250-  11.250   85,934.65
  1056.  129087   02 JOHN Q PUBLIC       08/31/2006   9.785  0.215   10.000   36,900.98
  1057.  138264   03 ANDREW ANDERSON     01/31/2010   8.375  0.250    8.626  135,968.99
  1058.  149821   03 PAUL PUBLIC         07/30/1998  13.250  0.250-  13.000   56,654.15
  1059.  298743   04 LEWIS LEAPYEAR      02/29/2004  12.500  0.250-  12.250   12,125.54
  1060.  
  1061.  
  1062.                             E N D   O F   R E P O R T
  1063.  
  1064.  
  1065.  
  1066.      First, identify this Parm file, so others can easily identify what we are
  1067.      trying to do.  Build a 'flower box' of asterisks, and copy in the first
  1068.      several lines of the report.  Then add some text describing what we intend
  1069.      to do.
  1070.  
  1071.  
  1072. ********************
  1073. *INT110                       FIRST NATIONAL BANK                      PAGE   1
  1074. *TIME 19:25              ADJUSTABLE RATE MORTGAGE CHANGES         DATE 12/31/87
  1075. ********************
  1076. *EXAMPLE BANK2.PAR
  1077. *  Use ONLY records that have a '/' in the 35th position
  1078. *  (the slash between MM and DD)
  1079. *  Extract the Account number, Branch, Interest rate change,
  1080. *              new interest rate and the loan balance.
  1081. ********************
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.                                           17
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.      We only want records that have a '/' in the 35th position.  This is part of
  1101.      the MATURE DATE field.
  1102.      Add the line "D  35  1 /" to the parameter file.
  1103.  
  1104.                                    *
  1105.  123456   01 MYRON MYERS         12/31/2001  10.250  0.250-  10.000   40,392.25
  1106.  123847   02 SUSAN SMITH         12/31/1999  11.500  0.250-  11.250   85,934.65
  1107.  129087   02 JOHN Q PUBLIC       08/31/2006   9.785  0.215   10.000   36,900.98
  1108.  138264   03 ANDREW ANDERSON     01/31/2010   8.375  0.250    8.626  135,968.99
  1109.  149821   03 PAUL PUBLIC         07/30/1998  13.250  0.250-  13.000   56,654.15
  1110.  298743   04 LEWIS LEAPYEAR      02/29/2004  12.500  0.250-  12.250   12,125.54
  1111.  
  1112.  
  1113.                             E N D   O F   R E P O R T
  1114.  
  1115.  
  1116.  
  1117.  
  1118.      The rest of the parms are exactly the same as example 1.  You can either
  1119.      copy them from that file, or follow the instructions from the example, they
  1120.      should look like this:
  1121.  
  1122.      C   1  6 Account number
  1123.      C  10  2 Branch
  1124.      N  53  6 change
  1125.      N  61  6 new rate
  1126.      N  69 10 balance
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.                                           18
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.      INPUT FILE:         BANK.TXT
  1164.  
  1165. INT110                       FIRST NATIONAL BANK                      PAGE   1
  1166. TIME 19:25              ADJUSTABLE RATE MORTGAGE CHANGES         DATE 12/31/87
  1167.  
  1168. ACCOUNT  BR NAME                  MATURE     OLD    CHANGE   NEW      BALANCE
  1169.                                              RATE            RATE
  1170.  
  1171. 123456   01 MYRON MYERS         12/31/2001  10.250  0.250-  10.000   40,392.25
  1172. 123847   02 SUSAN SMITH         12/31/1999  11.500  0.250-  11.250   85,934.65
  1173. 129087   02 JOHN Q PUBLIC       08/31/2006   9.785  0.215   10.000   36,900.98
  1174. 138264   03 ANDREW ANDERSON     01/31/2010   8.375  0.250    8.626  135,968.99
  1175. 149821   03 PAUL PUBLIC         07/30/1998  13.250  0.250-  13.000   56,654.15
  1176. 298743   04 LEWIS LEAPYEAR      02/29/2004  12.500  0.250-  12.250   12,125.54
  1177.  
  1178.  
  1179.                            E N D   O F   R E P O R T
  1180.  
  1181.  
  1182.      PARAMETER FILE:     BANK2.PAR
  1183.  
  1184. ********************
  1185. *INT110                       FIRST NATIONAL BANK                      PAGE   1
  1186. *TIME 19:25              ADJUSTABLE RATE MORTGAGE CHANGES         DATE 12/31/87
  1187. ********************
  1188. *EXAMPLE BANK2.PAR
  1189. *  Use ONLY records that have a '/' in the 35th position
  1190. *  (the slash between MM and DD)
  1191. *  Extract the Account number, Branch, Interest rate change,
  1192. *              new interest rate and the loan balance.
  1193. ********************
  1194. D  35  1 /
  1195. C   1  6 Account number
  1196. C  10  2 Branch
  1197. N  53  6 change
  1198. N  61  6 new rate
  1199. N  69 10 balance
  1200.  
  1201.  
  1202.      OUTPUT FILE:        BANK2.OUT
  1203.  
  1204.      "123456","01",-.250,10.000,40392.25
  1205.      "123847","02",-.250,11.250,85934.65
  1206.      "129087","02",.215,10.000,36900.98
  1207.      "138264","03",.250,8.626,135968.99
  1208.      "149821","03",-.250,13.000,56654.15
  1209.      "298743","04",-.250,12.250,12125.54
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.                                           19
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.      Example 3.  DATE1.PAR
  1227.  
  1228.      We have received the employee master file from the company mini computer.
  1229.      The date field is in the format (YY/MM/DD).  To convert this file into a
  1230.      comma DELIMITed file is a two step process.  The first step is to reformat
  1231.      the date to (MM/DD/YY) and leave the rest of the record the same (this
  1232.      example).  The second step is to DELIMIT it (example 4).
  1233.                                       _______
  1234.  
  1235.      INPUT FILE:    DATE.TXT
  1236.  
  1237.  
  1238.  12345662/05/15MYRON    MYERS        123 S 68TH STREET     AURORA      CO01500
  1239.  12384750/12/12SUSAN    SMITH        1955 W ANY STREET     LITTLETOWN  CO01700
  1240.  12908758/06/25JOHN Q   PUBLIC       123 N AMERICAN        DENVER      CO03300
  1241.  13826467/04/30ANDREW   ANDERSON     5633 E OAK            FT COLLINS  CO10000
  1242.  14982155/03/31PAUL     PUBLIC       8934 MAIN #108        DENVER      CO02000
  1243.  29874360/02/29LEWIS    LEAPYEAR     2929 MAPLE DRIVE      GOLDEN      CO02500
  1244.  
  1245.  
  1246.  
  1247.      First, identify this Parm file, so others can easily identify what we are
  1248.      trying to do.  Build a 'flower box' of asterisks, and copy in the first
  1249.      several lines of the report.  Then add some text describing what we intend
  1250.      to do.
  1251.  
  1252.      *******************
  1253.      *Employee master file - from the mini
  1254.      *******************
  1255.      *EXAMPLE DATE1.PAR
  1256.      *  The master file is in a fixed file format.  The date of birth is stored
  1257.      *  in YY/MM/DD format.  The target program doesn't understand this format.
  1258.      *  1)  Move the employee number (6 bytes)
  1259.      *  2)  Move the month and day
  1260.      *  3)  Move the slash
  1261.      *  4)  Move the year (now at the end of the date)
  1262.      *  5)  Move the rest of the data
  1263.      *  6)  USE NO SEPARATORS - so we can use delimit again to break the
  1264.      *      records into fields.
  1265.      ********************
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.                                           20
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.      All we want to do is rearrange the fields, so we will only be using the
  1291.      Move parameters.  We must also specify Snone so that no separators are
  1292.      used.
  1293.  
  1294.      The first field is the Employee number.
  1295.      The second field is the month/day.
  1296.      The third field is the slash (to put between the month/day and the year.
  1297.      The forth field is the year.
  1298.      The fifth field is the rest of the record.
  1299.  
  1300.     1  4 3  2                               5
  1301.          *
  1302.  12345662/05/15MYRON    MYERS        123 S 68TH STREET     AURORA      CO01500
  1303.  12384750/12/12SUSAN    SMITH        1955 W ANY STREET     LITTLETOWN  CO01700
  1304.  12908758/06/25JOHN Q   PUBLIC       123 N AMERICAN        DENVER      CO03300
  1305.  13826467/04/30ANDREW   ANDERSON     5633 E OAK            FT COLLINS  CO10000
  1306.  14982155/03/31PAUL     PUBLIC       8934 MAIN #108        DENVER      CO02000
  1307.  29874360/02/29LEWIS    LEAPYEAR     2929 MAPLE DRIVE      GOLDEN      CO02500
  1308.  
  1309.  
  1310.      PARAMETER FILE:     DATE1.PAR
  1311. *******************
  1312. *Employee master file - from the mini
  1313. *******************
  1314. *EXAMPLE DATE1.PAR
  1315. *  The master file is in a fixed file format.  The date of birth is stored
  1316. *  in YY/MM/DD format.  The target program doesn't understand this format.
  1317. *  1)  Move the employee number (6 bytes)
  1318. *  2)  Move the month and day
  1319. *  3)  Move the slash
  1320. *  4)  Move the year (now at the end of the date)
  1321. *  5)  Move the rest of the data
  1322. *  6)  USE NO SEPARATORS - so we can use delimit again to break the
  1323. *      records into fields.
  1324. ********************
  1325. M   1  6  Employee number
  1326. M  10  5  month and day
  1327. M   9  1  slash
  1328. M   7  2  year
  1329. M  15 63  rest of data
  1330. Snone
  1331.  
  1332.  
  1333.      OUTPUT FILE:        DATE1.OUT
  1334.  
  1335. 12345605/15/62MYRON    MYERS        123 S 68TH STREET     AURORA      CO01500
  1336. 12384712/12/50SUSAN    SMITH        1955 W ANY STREET     LITTLETOWN  CO01700
  1337. 12908706/25/58JOHN Q   PUBLIC       123 N AMERICAN        DENVER      CO03300
  1338. 13826404/30/67ANDREW   ANDERSON     5633 E OAK            FT COLLINS  CO10000
  1339. 14982103/31/55PAUL     PUBLIC       8934 MAIN #108        DENVER      CO02000
  1340. 29874302/29/60LEWIS    LEAPYEAR     2929 MAPLE DRIVE      GOLDON      CO02500
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.                                           21
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.      Example 4.  DATE2.PAR
  1354.  
  1355.      Now we want to delimit the fields from Example 3 into a comma delimited
  1356.      file.
  1357.  
  1358.      INPUT FILE:    DATE1.OUT
  1359.  
  1360.  
  1361.  12345605/15/62MYRON    MYERS        123 S 68TH STREET     AURORA      CO01500
  1362.  12384712/12/50SUSAN    SMITH        1955 W ANY STREET     LITTLETOWN  CO01700
  1363.  12908706/25/58JOHN Q   PUBLIC       123 N AMERICAN        DENVER      CO03300
  1364.  13826404/30/67ANDREW   ANDERSON     5633 E OAK            FT COLLINS  CO10000
  1365.  14982103/31/55PAUL     PUBLIC       8934 MAIN #108        DENVER      CO02000
  1366.  29874302/29/60LEWIS    LEAPYEAR     2929 MAPLE DRIVE      GOLDEN      CO02500
  1367.  
  1368.  
  1369.  
  1370.      First, identify this Parm file, so others can easily identify what we are
  1371.      trying to do.  Build a 'flower box' of asterisks, and copy in the first
  1372.      several lines of the report.  Then add some text describing what we intend
  1373.      to do.
  1374.  
  1375.  
  1376.      PARAMETER FILE:     DATE2.PAR
  1377.  
  1378.      *******************
  1379.      *Employee master file - from the mini - AFTER THE DATE HAS BEEN REFORMATTED
  1380.      *******************
  1381.      *EXAMPLE DATE2.PAR
  1382.      *  Break the record into fields:
  1383.      *    Employee number, date of birth, first name, last name, address,
  1384.      *    city, state, monthly salary
  1385.      ********************
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.                                           22
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.      The first field is the employee number.  Identification numbers should
  1417.      always be treated as character fields.  It starts in the first column, and
  1418.      is 6 characters long.
  1419.      Add the line "C   1  6  Employee number" to the parameter file.
  1420.  
  1421.      The second field is the date.  It starts at column 7 and is 8 characters
  1422.      long.
  1423.      Add the line "C   7  8  date" to the parameter file.
  1424.  
  1425.      The third fields is the first name.  It starts at column 15 and is 9
  1426.      characters long.
  1427.      Add the line "C  15  9  first name" to the parameter file.
  1428.  
  1429.      The forth field is the last name.  It starts at column 24 and is 13
  1430.      characters long.
  1431.      Add the line "C  24 13  last name" to the parameter file.
  1432.  
  1433.      The fifth field is the street address.  It starts at column 37 and is 22
  1434.      characters long.
  1435.      Add the line "C  37 22  address" to the parameter file.
  1436.  
  1437.      The sixth field is the city.  It starts at column 59 and is 12 characters
  1438.      long.
  1439.      Add the line "C  59 12  city" to the parameter file.
  1440.  
  1441.      The seventh field is the state.  It starts at column 71 and is 2 characters
  1442.      long.
  1443.      Add the line "C  71  2  state" to the parameter file.
  1444.  
  1445.      The eight field is the salary field.  It is numeric, and starts at column
  1446.      73 and is 5 characters long.
  1447.      Add the line "C  73  5  monthly salary" to the parameter file.
  1448.  
  1449.  
  1450.      1    2      3        4                 5                6          7  8
  1451.  
  1452.  
  1453.  12345605/15/62MYRON    MYERS        123 S 68TH STREET     AURORA      CO01500
  1454.  12384712/12/50SUSAN    SMITH        1955 W ANY STREET     LITTLETOWN  CO01700
  1455.  12908706/25/58JOHN Q   PUBLIC       123 N AMERICAN        DENVER      CO03300
  1456.  13826404/30/67ANDREW   ANDERSON     5633 E OAK            FT COLLINS  CO10000
  1457.  14982103/31/55PAUL     PUBLIC       8934 MAIN #108        DENVER      CO02000
  1458.  29874302/29/60LEWIS    LEAPYEAR     2929 MAPLE DRIVE      GOLDEN      CO02500
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.                                           23
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.      PARAMETER FILE:     DATE2.PAR
  1480.  
  1481. *******************
  1482. *Employee master file - from the mini - AFTER THE DATE HAS BEEN REFORMATED
  1483. *******************
  1484. *EXAMPLE DATE2.PAR
  1485. *  Break the record into fields:
  1486. *    Employee number, date of birth, first name, last name, address,
  1487. *    city, state, monthly salary
  1488. ********************
  1489. C   1  6  Employee number
  1490. C   7  8  date
  1491. C  15  9  first name
  1492. C  24 13  last name
  1493. C  37 22  address
  1494. C  59 12  city
  1495. C  71  2  state
  1496. N  73  5  monthy salary
  1497.  
  1498.  
  1499.  
  1500.      OUTPUT FILE:   DATE2.OUT
  1501.  
  1502. "123456","05/15/62","MYRON","MYERS","123 S 68TH STREET","AURORA","CO",1500
  1503. "123847","12/12/50","SUSAN","SMITH","1955 W ANY STREET","LITTLETOWN","CO",1700
  1504. "129087","06/25/58","JOHN Q","PUBLIC","123 N AMERICAN","DENVER","CO",3300
  1505. "138264","04/30/67","ANDREW","ANDERSON","5633 E OAK","FT COLLINS","CO",10000
  1506. "149821","03/31/55","PAUL","PUBLIC","8934 MAIN #108","DENVER","CO",2000
  1507. "298743","02/29/60","LEWIS","LEAPYEAR","2929 MAPLE DRIVE","GOLDON","CO",2500
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.                                           24
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.  
  1542.      Example 5.  DATE2MAC.PAR
  1543.  
  1544.      In this example we are converting the employee master file to be used on a
  1545.      Macintosh computer.  The Macintosh computer uses TAB delimited files, with
  1546.      a CR (not CR-LF) to denote the end of record.
  1547.  
  1548.      We will use the output file generated in example 3 as our input (example 3
  1549.      reformatted a fixed format file).
  1550.  
  1551.      INPUT FILE:    DATE1.OUT
  1552.  
  1553.  
  1554.  12345605/15/62MYRON    MYERS        123 S 68TH STREET     AURORA      CO01500
  1555.  12384712/12/50SUSAN    SMITH        1955 W ANY STREET     LITTLETOWN  CO01700
  1556.  12908706/25/58JOHN Q   PUBLIC       123 N AMERICAN        DENVER      CO03300
  1557.  13826404/30/67ANDREW   ANDERSON     5633 E OAK            FT COLLINS  CO10000
  1558.  14982103/31/55PAUL     PUBLIC       8934 MAIN #108        DENVER      CO02000
  1559.  29874302/29/60LEWIS    LEAPYEAR     2929 MAPLE DRIVE      GOLDEN      CO02500
  1560.  
  1561.  
  1562.      We will copy the parm file from example 4 (comma delimiting the employee
  1563.      master file) and make a few minor adjustments.
  1564.  
  1565.      *******************
  1566.      *Employee master file - from the mini - AFTER THE DATE HAS BEEN REFORMATTED
  1567.      *  TARGET MACHINE IS THE MACINTOSH
  1568.      *******************
  1569.      *EXAMPLE DATE2MAC.PAR
  1570.      *  Break the record into fields:
  1571.      *    Employee number, date of birth, first name, last name, address,
  1572.      *    city, state, monthly salary.
  1573.      *    S\009 is to change the field separators to a TAB (ASCII char 9)
  1574.      *    R\013 is to change the record separators to a CR (ASCII char 13)
  1575.      ********************
  1576.  
  1577.      The 'standard' text files on a Macintosh are different than on a PC.
  1578.      First, the Mac separates fields with TABs, not commas.  It separates
  1579.      records with a CR, not a CR-LF.  It also does NOT surround fields with
  1580.      double quotes.
  1581.  
  1582.      Add the S\009 (field Separator = TAB), R\013 (Record separator = CR), and
  1583.      change the Character parameters to Move parameters.
  1584.  
  1585.      M   1  6  Employee number
  1586.      M   7  8  date
  1587.      M  15  9  first name
  1588.      M  24 13  last name
  1589.      M  37 22  address
  1590.      M  59 12  city
  1591.      M  71  2  state
  1592.      N  73  5  monthly salary
  1593.      S\009
  1594.      R\013
  1595.  
  1596.  
  1597.  
  1598.                                           25
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.      PARAMETER FILE:     DATE2MAC.PAR
  1607.  
  1608. *******************
  1609. *Employee master file - from the mini - AFTER THE DATE HAS BEEN REFORMATED
  1610. *  TARGET MACHINE IS THE MACINTOSH
  1611. *******************
  1612. *EXAMPLE DATE2MAC.PAR
  1613. *  Break the record into fields:
  1614. *    Employee number, date of birth, first name, last name, address,
  1615. *    city, state, monthly salary.
  1616. *    S\009 is to change the field separators to a TAB (ASCII char 9)
  1617. *    R\013 is to change the record separators to a CR (ASCII char 13)
  1618. ********************
  1619. M   1  6  Employee number
  1620. M   7  8  date
  1621. M  15  9  first name
  1622. M  24 13  last name
  1623. M  37 22  address
  1624. M  59 12  city
  1625. M  71  2  state
  1626. N  73  5  monthy salary
  1627. S\009
  1628. R\013
  1629.  
  1630.  
  1631.  
  1632.      OUTPUT FILE:        DATE2MAC.OUT
  1633.  
  1634. 123456 05/15/62 MYRON    MYERS     123 S 68TH STREET  AURORA      CO 1500
  1635. 123847 12/12/50 SUSAN    SMITH     1955 W ANY STREET  LITTLETOWN  CO 1700
  1636. 129087 06/25/58 JOHN Q   PUBLIC    123 N AMERICAN     DENVER      CO 3300
  1637. 138264 04/30/67 ANDREW   ANDERSON  5633 E OAK         FT COLLINS  CO 10000
  1638. 149821 03/31/55 PAUL     PUBLIC    8934 MAIN #108     DENVER      CO 2000
  1639. 298743 02/29/60 LEWIS    LEAPYEAR  2929 MAPLE DRIVE   GOLDON      CO 2500
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.  
  1658.  
  1659.  
  1660.  
  1661.                                           26
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.           DISCLAIMER - AGREEMENT
  1669.  
  1670.                Users of DELIMIT must accept this disclaimer of warranty:
  1671.                         _______
  1672.                "DELIMIT is supplied as is.  The author disclaims all warranties,
  1673.                 _______
  1674.                expressed or implied, including, without limitation, the
  1675.                warranties of merchantability and of fitness for any purpose.
  1676.                The author assumes no liability for damages, direct or
  1677.                consequential, which may result from the use of DELIMIT."
  1678.                                                                _______
  1679.  
  1680.                DELIMIT is a "shareware program" and is provided at no charge to
  1681.                _______
  1682.                the user for evaluation.  Feel free to share it with your
  1683.                friends, but please do not give it away altered or as part of
  1684.                another system.  The essence of "user-supported" software is to
  1685.                provide computer users with quality software without high prices,
  1686.                and yet to provide incentive for programmers to continue to
  1687.                develop new products.  If you find this program useful and find
  1688.                that you are using DELIMIT and continue to use DELIMIT after a
  1689.                                   _______                     _______
  1690.                reasonable trial period, you must make a registration payment of
  1691.                $15 to Grosbach Software.  The $15 registration fee will license
  1692.                one copy for use on any one computer at any one time.  You must
  1693.                treat this software just like a book.  An example is that this
  1694.                software may be used by any number of people and may be freely
  1695.                moved from one computer location to another, so long as there is
  1696.                no possibility of it being used at one location while it's being
  1697.                used at another.  Just as a book cannot be read by two different
  1698.                persons at the same time.
  1699.  
  1700.                Commercial users of DELIMIT must register and pay for their
  1701.                                    _______
  1702.                copies of DELIMIT within 30 days of first use or their license is
  1703.                          _______
  1704.                withdrawn.  Site-License arrangements may be made by contacting
  1705.                Grosbach Software.
  1706.  
  1707.                Registered Non-profit organizations may use DELIMIT free of
  1708.                                                            _______
  1709.                charge.
  1710.  
  1711.                Anyone distributing DELIMIT for any kind of remuneration must
  1712.                                    _______
  1713.                first contact Grosbach Software at the address below for
  1714.                authorization.  This authorization will be automatically granted
  1715.                to distributors recognized by the Association of Shareware
  1716.                Professionals (ASP) as adhering to its guidelines for shareware
  1717.                distributors, and such distributors may begin offering DELIMIT
  1718.                                                                       _______
  1719.                immediately (However Grosbach Software must still be advised so
  1720.                that the distributor can be kept up-to-date with the latest
  1721.                version of DELIMIT).
  1722.                           _______
  1723.  
  1724.                You are encouraged to pass a copy of DELIMIT along to your
  1725.                                                     _______
  1726.                friends for evaluation.  Please encourage them to register their
  1727.                copy if they find that they can use it.
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.                                             27
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.           SOFTWARE SUPPORT
  1744.                You will receive three months free support via U.S. Mail or
  1745.                CompuServe, starting from the date your registration is received.
  1746.  
  1747.                If you believe you have discovered a bug, please send a copy of
  1748.                the parm file and data file and a brief description to:
  1749.  
  1750.                US Mail                       or   CompuServe
  1751.                Grosbach Software                  Roy G Grosbach 71562,3251
  1752.                PO Box 80
  1753.                Lewisville, TX 75067
  1754.  
  1755.  
  1756.           HARDWARE REQUIREMENTS
  1757.                A hard disk is not required.
  1758.                Tested on Monochrome, MCGA, and VGA systems.
  1759.                Tested on DOS version 3.30, 4.00, 5.00 and 6.  Should not have
  1760.                problems with version 2.00 or greater.
  1761.  
  1762.  
  1763.           REGISTRATION
  1764.                If you find DELIMIT useful, and continue to use it for more than
  1765.                            _______
  1766.                30 days, you are required to register your copy.  Please use the
  1767.                enclosed registration form.  You will be granted the right to
  1768.                continue to use DELIMIT.  You will receive three months free
  1769.                                _______
  1770.                support via U.S. Mail or CompuServe, starting from the date your
  1771.                registration is received.
  1772.  
  1773.  
  1774.                SINGLE USER REGISTRATION: $15 fee.
  1775.  
  1776.                SITE REGISTRATION/CORPORATE REGISTRATION:
  1777.                     1 copy $15
  1778.                     2-10 copies $12.50 for each additional.
  1779.                     11-100 copies $10.00 for each additional
  1780.                     over 100 copies $7.50 for each additional.
  1781.  
  1782.                EXAMPLE:
  1783.                     You have a small business, with 10 people using computers.
  1784.                     In good faith, you estimate at most, 3 people will be using
  1785.                     DELIMIT on a regular basis.  You also want the latest copy
  1786.                     _______
  1787.                     of DELIMIT.  Your cost would be $15 for the first copy, and
  1788.                        _______
  1789.                     2 x $12.50 for the additional copies, and $5.00 for the
  1790.                     latest version of DELIMIT on disk for a total of $45.  If
  1791.                                       _______
  1792.                     you already have the latest version, the $5.00 will be
  1793.                     refunded, or it may be applied towards shipping of the next
  1794.                     version of DELIMIT. 
  1795.                                _______
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803.  
  1804.  
  1805.                                             28
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.                                  DELIMIT REGISTRATION FORM
  1812.                                  _______
  1813.  
  1814.  
  1815.           To register your copy of DELIMIT, mail this form with payment of the
  1816.                                    _______
  1817.           license fee to the address at the bottom of this form.
  1818.  
  1819.           NAME:               _____________________________________________
  1820.  
  1821.           MAILING ADDRESS:    _____________________________________________
  1822.  
  1823.                               _____________________________________________
  1824.  
  1825.                               _____________________________________________
  1826.  
  1827.           COUNTRY:            _____________________________________________
  1828.  
  1829.           VERSION OF DELIMIT: ________        
  1830.           Where you received your copy of Delimit:
  1831.                Friend    CompuServe
  1832.                BBS or Shareware Vendor  ___________________________________
  1833.  
  1834.           AMOUNT         DESCRIPTION
  1835.             $15.00   1  X $15.00   Single User license for DELIMIT
  1836.                     ___
  1837.           $_______  ___ X $12.50   Additional licenses of DELIMIT (2-10)
  1838.           $_______  ___ X $10.00   Additional licenses of DELIMIT (11-100)
  1839.           $_______  ___ X  $7.50   Additional licenses of DELIMIT (over 100)
  1840.           $_______  ___ X  $5.00   Latest version of DELIMIT on disk 
  1841.                                    ___ 5 1/4    ___ 3 1/2
  1842.                                    ___ refunded if you have current version
  1843.                                    ___ send the NEXT version of DELIMIT
  1844.                                                                 _______
  1845.  
  1846.           $_______       Texas residents add the current sales tax amount (1993
  1847.                          = 8.25%)
  1848.  
  1849.           $_______       Total due.
  1850.  
  1851.           Mail to:       Grosbach Software
  1852.                          P.O. Box 80
  1853.                          Lewisville, TX  75067
  1854.                          USA
  1855.  
  1856.           CompuServe:    Roy G Grosbach 71562,3251
  1857.  
  1858.           Check:         Please mail checks or money orders to Grosbach
  1859.                          Software.  Checks and money orders must be drawn on a
  1860.                          US bank in US dollars.
  1861.  
  1862.           Credit Card:   Please call Public (software) Library with your MC,
  1863.                          Visa, AmEx, or Discover card by calling 800-242-4PsL
  1864.                          (from overseas: 713-524-6394) or by FAX to 713-524-6398
  1865.                          or by CompuServe to 71355,470.  These numbers are for
  1866.                          odering only.  Grosbach Software can NOT be reached at
  1867.                          those numbers.
  1868.  
  1869.           Thank you for supporting Shareware and DELIMIT.
  1870.  
  1871.           If you have any comments, or suggestions please contact Grosbach
  1872.           Software.
  1873.