home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / TEXT / UTILITY / SWPUTILS.ZIP / SWPUTILS.DOC < prev    next >
Encoding:
Text File  |  1991-03-14  |  23.0 KB  |  664 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.              This set of programs was done to 'work' data files  allowing
  7.              the partial selection of the data with different criterions.
  8.  
  9.              You  can  test  it by free but if you keep using it you must
  10.              register as user.  If you develop systems for third  parties
  11.              you  can  also  integrate it within your own application but
  12.              you must register the number of copies your client will use,
  13.              for more than 5 copies installed at a single company ask for
  14.              quantity discounts. Registered users will be notified of bug
  15.              reports, workarounds, and release of new versions.
  16.  
  17.              Single copy registration fee: $ 50 USD
  18.  
  19.              The programs included are the following:
  20.  
  21.              Modify    Allows insertions and deletions of 'columns'  (the
  22.                        same  positions  of  every  record of the file) as
  23.                        convertions  to  upper  or   lowercase,   trimming
  24.                        (elimination  of  leading  and/or trailing spaces)
  25.                        and elimination of supplementary spaces (all  con-
  26.                        secutive spaces in the input are left as one space
  27.                        in the output).
  28.  
  29.              Fields    Instead  of  seeing  the  file as a set of columns
  30.                        this program sees it as a set of fields  separated
  31.                        by arbitrary delimiters. You may select the set of
  32.                        delimiters  to  be  used and a subset of fields to
  33.                        send the output.  You also can convert the  fields
  34.                        to  fixed length,  in such case the fields will be
  35.                        truncated or padded with spaces at the  right.  As
  36.                        in 'Modify' you can convert to upper or lower case
  37.                        and eliminate identical consecutive records.
  38.  
  39.              Head      With  this program you can send to the output only
  40.                        the first n lines of a file.
  41.  
  42.              Tail      This program send to the output the last  n  lines
  43.                        of a file or all the lines but the n first ones.
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.                                           1
  52.  
  53.  
  54.  
  55.  
  56.  
  57.              Lines     With  this one you can select the lines to send to
  58.                        the output the lines that acomplish certain condi-
  59.                        tions as
  60.                        a) Contains (or not) some literal,
  61.                        b) All lines after the first one  containing  some
  62.                           literal.
  63.                        c) All lines until one that contains some literal.
  64.  
  65.                        The  literals  can be expressed in a few forms as:
  66.                        the first word  in  the  line,  the  last  one  or
  67.                        anyone,  you  can  also specify that the word must
  68.                        begin, end or contain a set of consecutive charac-
  69.                        ters and the search may be case sensitive  or  in-
  70.                        sensitive.
  71.  
  72.              Every time the programs ran check themselves to prevent con-
  73.              tamination originated on virus,  disk errors,  etc. This can
  74.              take a few seconds but  I  hope  you  will  appreciate  this
  75.              little loss of performance in change of increased security.
  76.  
  77.              The  programs  can  reside in any directory you may want but
  78.              they must not be renamed as the  name  is  included  in  the
  79.              self-checking procedure.
  80.  
  81.              The  programs  have a common interface so the parameter han-
  82.              dling is the same for all programs.  Following is  a  little
  83.              explanation about that common interface.
  84.  
  85.              In general a command line should be in the form:
  86.  
  87.              progname -{a|b} [-c:12,<literal>] [<]InpFile [[>]OutFile]
  88.  
  89.              progname without any parameter will display the help screen.
  90.  
  91.              Parameters  or  symbols enclosed in square brackets [..] are
  92.              optional.
  93.  
  94.              Parameters or symbols enclosed in square brackets  {..}  are
  95.              mandatory  but  you must select one of the options separated
  96.              by commas or vertical bars.
  97.  
  98.  
  99.  
  100.  
  101.  
  102.                                           2
  103.  
  104.  
  105.  
  106.  
  107.  
  108.              In the above example:
  109.              -{a|b} means that you must select either -a or -b
  110.  
  111.              [-c:12,<literal>] means that this parameter can be  ommited,
  112.              if you use it you must replace <literal> with a literal (see
  113.              below the sintax for literals).
  114.  
  115.              [<]InpFile  means that InpFile must be present, you must re-
  116.              place  InpFile  with the file name you want to use.  The [<]
  117.              part means that the < can be used to redirect the file.
  118.  
  119.              [[>]OutFile] means that the OutFile can be ommited,  in such
  120.              case  the  output will be sent to the screen.  If OutFile is
  121.              present you can use the > to redirect the file.
  122.  
  123.              For more details about  the  files  see  the  FILES  section
  124.              below.
  125.  
  126.  
  127.              PROGRAM PARAMETERS
  128.  
  129.              Parameters  or switches start with a dash '-' wich is inter-
  130.              changeable with a slash '/'.
  131.  
  132.              Parameters must be separated between them but at  least  one
  133.              space  and  can't  be  'stacked'.  What I mean is that -a -b
  134.              isn't the same that -ab as used in some programs.
  135.  
  136.              Sometimes a plus sign '+' is used to invert the significance
  137.              of the parameter.
  138.              i.e.: -n is used to indicate the program 'Tail'  the  number
  139.              of  lines  (counted from the end of the file) to send to the
  140.              output, while using +n instead of -n means send all file but
  141.              the first n lines.
  142.  
  143.              The letter(s) that identify the parameters can be  upper  or
  144.              lower  case so /n -n -N and /N have the same meaning for the
  145.              program.
  146.  
  147.              Some parameters, like -i, to insert characters,  or -lf,  to
  148.              specify  the  file  to  be  used  for  logging,   have  sub-
  149.              parameters. The colon ':'  or the equal sign '=' can be used
  150.  
  151.  
  152.  
  153.                                           3
  154.  
  155.  
  156.  
  157.  
  158.  
  159.              to separate the parameter 'name' from the  data,  the  comma
  160.              ',' is used as separator when the data consists of more than
  161.              one item.
  162.  
  163.  
  164.              RANGES
  165.  
  166.              Sometimes  is needed to indicate a range as in 'positions 10
  167.              to 13' this can be expressed as  10;13  or  10/13;  in  some
  168.              cases  you  may  want  to  say  something like '4 characters
  169.              starting on position 10', this could be expressed as 10,4 or
  170.              10:4 and it's equivalent to the previous example.  All forms
  171.              are  interchangeable,  you  may use that fitting better your
  172.              needs.
  173.  
  174.  
  175.              LITERALS
  176.  
  177.              Some parameters requires literals,  those must  be  enclosed
  178.              between  a  pair  of  delimiters.   The  character  used  as
  179.              delimiter must not be contained in the literal. The pairs of
  180.              delimiters allowed are the following:
  181.              (..) brackets
  182.              [..] square brackets
  183.              {..} curly brackets
  184.              '..' right quotes (apostrophes)
  185.              ".." double quotes
  186.  
  187.              If it's necessary to include control characters in a literal
  188.              this can be done in two ways: ^A and #001 will  produce  the
  189.              same  result  because  the  internal  representation  of the
  190.              Control-A is a  byte  with  a  decimal  value  of  1.  While
  191.              processing the string the program interprets the ^x (being x
  192.              any  character in the range @ to Del) and replaces the caret
  193.              '^' and the character to  its  right  by  the  corresponding
  194.              value.  To indicate a special character in the #ddd form the
  195.              # must be followed by exactly 3 digits in the range  000  to
  196.              255,  in such case the four characters will be replaced by a
  197.              single one with the desired value.
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.                                           4
  205.  
  206.  
  207.  
  208.  
  209.  
  210.              You must be careful using the following characters:
  211.              angle brackets: < and > and vertical bar: |
  212.              Any of these characters will be interpreted by the DOS as an
  213.              instruction to redirect a file.  To prevent it you must  re-
  214.              place it with its decimal representation:
  215.              < = #060  > = #062  and  | = #124
  216.  
  217.              The  reverse  slash  \  is  used  by the programs as 'escape
  218.              character' to eliminate  the  special  significance  of  the
  219.              caret ^, the numeral # and the reverse slash \ itself.
  220.              So if you want to include a # in a string you must escape it
  221.              by preceding it with a reverse slash, i.e.: #000 will result
  222.              in a byte with all bits in zero but \#000 will left a # fol-
  223.              lowed by three ASCII zeros.  \^A will result in a caret fol-
  224.              lowed by a letter A but \\^A will result in a reverse  slash
  225.              followed by a byte with the value of the Ctl-A.
  226.  
  227.              Another  characters that may confuse the program if included
  228.              in literals are the slash / and the dash - but only when are
  229.              preceded by a space because this configuration will  be  in-
  230.              terpreted  as a parameter.  In this cases you can escape the
  231.              slash or dash with the reverse slash, so instead of ".. /.."
  232.              would be better to use ".. \/.." or "..#032/..".
  233.  
  234.  
  235.              FILES
  236.  
  237.              Input
  238.  
  239.              [<]InputFile means that the input file can be redirected  or
  240.              piped  from  another  program  or named but must be present,
  241.              i.e. < FileName or FileName are both valid options. The only
  242.              case where you don't need to put the InputFile is  when  you
  243.              are  piping  in the output of another program by using the |
  244.              before the program name.  In general input from the keyboard
  245.              is not allowed.
  246.  
  247.              Output
  248.  
  249.              You  may use the > to redirect the output to any file,  port
  250.              (COMx, LPTx),  the standard printer (PRN),  the screen (CON)
  251.              or even to the bit bucket (NUL).
  252.  
  253.              [[>]OutputFile] means that the output can be:
  254.  
  255.                                           5
  256.  
  257.  
  258.  
  259.  
  260.  
  261.              redirected to a file as in > FileName,
  262.              appended to a file as in >> FileName,
  263.              piped to another program as in | Prog2,
  264.              named as in FileName
  265.              or ommited at all to send the output to the screen.
  266.  
  267.              You can pipe to the InpFile of this program the OutFile of a
  268.              previous  one  and/or  the  OutFile  of  this program to the
  269.              InpFile of the next one in the pipe.
  270.              i.e.: FirstProg | ThisProg | LastProg
  271.              For more details please, read the DOS manual.
  272.  
  273.  
  274.              Logging (Statistics and Errors)
  275.  
  276.              The program headers and statistics  are  ever  sent  to  the
  277.              screen  independently of where the output is directed.  This
  278.              info can be redirected to a file,  there a special parameter
  279.              intended  to  do  that: -lf:LogFile you must replace LogFile
  280.              with any file name you may want to use,  included  NUL.  The
  281.              file will not be overwritten, all info sent will be appended
  282.              to  the  file  so if you forget to clean it time to time the
  283.              file will grow up until filling your disk.
  284.  
  285.  
  286.              Commands
  287.  
  288.              As some command lines can be too long some programs are able
  289.              to read the parameters of the command (those starting with a
  290.              dash but not the file names) from a file.  To  do  that  you
  291.              must  specify:  -cf:CommandFile  where  you  should  replace
  292.              CommandFile with any file name you want to use.
  293.              The commands in that file must be arranged one by record and
  294.              you can make it with any editor,  with the  'COPY  CON'  DOS
  295.              command  and even could generate it with a program,  in such
  296.              case each command must be terminated by a <CR><LF> sequence.
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.                                           6
  307.  
  308.  
  309.  
  310.  
  311.  
  312.              When the program finishes you will see a report with statis-
  313.              tics as follows:
  314.  
  315.              Input:         0 records with        0 bytes
  316.              Output:        0 records with        0 bytes
  317.              Time to run:   0.0 sec.
  318.              ProgName finished on 1991-02-25 17:04:58 with ErrorLevel: 0
  319.  
  320.              Time to time,  after that report you will see a message like
  321.              this one:
  322.              ------------------------------------------------------------
  323.              A  little  reminder: If you keep using this program you MUST
  324.              register!
  325.              For payment instructions at the DOS prompt type ProgName -?
  326.              If you already have done it THANKS!  ..  and excuse  me  for
  327.              this intromission.
  328.              ------------------------------------------------------------
  329.  
  330.              I hope that this don't bothers you too much.
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.                                           7
  358.  
  359.  
  360.  
  361.  
  362.  
  363.              This is the help screen of the program Modify
  364.              (sligthly reformated to fit the 60 columns of this manual)
  365.  
  366.              Modify.01.04 - 01/Feb/91 - (c) 1990, 1991 SoftWare Plus SA -
  367.              Eduardo J. Salom
  368.  
  369.              usage: modify [-tl] [-tr] [-d:ccc,nnn] [-d:ccc/nnn] \
  370.                            [-i:ccc,'...'] [[<]InpFile] [[>]OutFile]
  371.                 or: modify -cf:CmdFile [[<]InpFile] [[>]OutFile]
  372.              where:
  373.                 -tl          Trim Left  = Delete heading spaces.
  374.                 -tr          Trim Right = Delete trailing spaces.
  375.                 -d:c,n       Delete n chars starting on position c.
  376.                              (the ',' can be replaced for ':')
  377.                 -d:c/n       Delete chars from position c to position n.
  378.                              (the '/' can be replaced for ';')
  379.                 -i:c,"text"  Insert text starting at position ccc.
  380.                              The text to be inserted can be delimited by:
  381.                              "..", '..', [..], (..) or {..}
  382.                              ^x   will be replaced by Cntl-x
  383.                                   (x can be any char from @ to _)
  384.                              #ddd will be replaced by the corresponding
  385.                                   ASCII character
  386.                                   (ddd must be exactly 3 digits in the
  387.                                   range 000-255)
  388.                              To insert a '^', '#', '\' or a delimiter
  389.                              precede it with a '\'
  390.                 -lc          Translate resulting data to LowerCase.
  391.                 -uc          Translate resulting data to UpperCase.
  392.                 -b           Change strings of consecutive blanks to one
  393.                              blank
  394.                 -u           Delete line if identical to previous one
  395.                              (Unique).
  396.                 -cf          File with commands as described above but
  397.                              one per record.
  398.  
  399.              NOTE: The delete/insert operations can't exceed 10.
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.                                           8
  409.  
  410.  
  411.  
  412.  
  413.  
  414.              This is the help screen of the program Fields
  415.              (sligthly reformated to fit the 60 columns of this manual)
  416.  
  417.              Fields.01.02 - 01/Feb/91 - (c) 1990, 1991 SoftWare Plus SA -
  418.              Eduardo J. Salom
  419.  
  420.              usage: fields [-d:<delims>] -f:<fields> [-uc] [-lc] [-u] \
  421.                            [<]InputFile [[>]OutputFile]
  422.                 or: fields -cf:<CommandFile> [<]InputFile [[>]OutputFile]
  423.              where:
  424.                 -d:<list of delimiters>
  425.                       A serie of characters to be used as delimiters.
  426.                       If this parameter is omitted the default delimiters
  427.                       will be the Space (#032) and the Tab (#009).
  428.                       To include the space or any control code you must
  429.                       supply its ASCII value preceded by a # sign: #ddd
  430.                       will be replaced by the corresponding ASCII
  431.                       character. ddd must be a number exactly 3 digits
  432.                       long in the range 000 to 255
  433.                 -f:<list of fields>
  434.                       The individual fields or range of fields to be
  435.                       included, separated by commas.
  436.                       Range of fields are individual fields separated by
  437.                       a dash.
  438.                       -f:-3,5-7,9- will include all fields 1 to 3 (-3),
  439.                                    5 to 7 (5-7) and from field 9 up to
  440.                                    the last one (9-).
  441.                       Each field can be followed by a : and the output
  442.                       field length.
  443.                       Fields longer than specified will be truncated,
  444.                       while shorter ones will be padded with spaces.
  445.                       *Only* for individual fields!
  446.                 -lc   Translate resulting data to LowerCase.
  447.                 -uc   Translate resulting data to UpperCase.
  448.                 -u    Delete line if identical to previous one (Unique).
  449.                       The checking will be done after the Output line was
  450.                       built
  451.                 -cf   File with commands as described above but one per
  452.                       record.
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                           9
  460.  
  461.  
  462.  
  463.  
  464.  
  465.              This is the help screen of the program Lines
  466.              (sligthly reformated to fit the 60 columns of this manual)
  467.  
  468.              Lines.01.04 - 12/Feb/91 - (c) 1990,  1991 SoftWare Plus SA -
  469.              Eduardo J. Salom
  470.  
  471.              usage: lines -s:<mask> [-i] -{f|t|o} [[<]InpFile] \
  472.                                     [[>]OutFile]
  473.              where:
  474.                 -s:<mask> where <mask> can be any string without embedded
  475.                       blanks
  476.                       if preceded by ^ will look only the first word of
  477.                       each line
  478.                       if terminated in ^ will look only the last word of
  479.                       each line
  480.                       if preceded by * will look for words terminated as
  481.                       <mask>
  482.                       if terminated in * will look for words starting as
  483.                       <mask>
  484.                       To cancel the special significance of ^ or *
  485.                       duplicate it
  486.                       i.e.: -s:^Fro* means: 'look for a line where its
  487.                             first word starts with the characters Fro'
  488.                             -s: (with a null mask) will search for empty
  489.                                 lines
  490.                 -i    The search must be done case insensitive
  491.                 -f    Send to output all lines once <mask> found (from)
  492.                 -t    Send to output all lines until <mask> found (to)
  493.                 -o    Send to output all lines where <mask> found (only)
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.                                           10
  511.  
  512.  
  513.  
  514.  
  515.  
  516.              This is the help screen of the program Tail
  517.              (sligthly reformated to fit in 60 columns)
  518.  
  519.              Tail.01.02 - 23/Nov/90 - (c) 1990,  1991 SoftWare Plus SA  -
  520.              Eduardo J. Salom
  521.  
  522.              usage: tail -n [-lf:LogFile] [<]InpFile [[>]OutFile]
  523.              where: n       is the number of lines to send to the output
  524.                             file
  525.                     LogFile can be a file used to log the control info
  526.                     provided by the program. If you redirect (or pipe)
  527.                     the Output the control info will not be redirected
  528.                     along with the data.
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.                                           11
  562.  
  563.  
  564.  
  565.  
  566.  
  567.              This is the help screen of the program Head
  568.              (sligthly reformated to fit the 60 columns of this manual)
  569.  
  570.              Head.01.01  - 23/Nov/90 - (c) 1990,  1991 SoftWare Plus SA -
  571.              Eduardo J. Salom
  572.  
  573.              usage: head -n [-lf:LogFile] [<]InpFile [[>]OutFile]
  574.              where: n       is the number of lines to send to the  output
  575.              file
  576.                     LogFile can be a file used to log the control info
  577.                             provided by the program. If you redirect (or
  578.                             pipe) the Output the control info will not be
  579.                             redirected along with the data.
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.                                           12
  613.  
  614.  
  615.  
  616.  
  617.  
  618.              Bug  reports,  questions about these programs as suggestions
  619.              for enhancements or for developing new programs will be wel-
  620.              comed.
  621.  
  622.              As my native  language  is  Spanish  any  correction  to  my
  623.              English  as  suggestions  to improve the readability to this
  624.              manual will be also welcomed.
  625.  
  626.              You can send me e-mail to the following addresses:
  627.              Internet: eduardo@swp.com.ar          <== prefered
  628.                    or  eduardo@m2xenix.psg.com
  629.              UUCP:     ..!uunet!swp.com.ar!eduardo <== prefered
  630.                    or  ..!uunet!m2xenix!eduardo
  631.              CompuServe: [73000,74]
  632.              BIX:        swp
  633.              Delphi:     SWP
  634.  
  635.              or AIR MAIL (surface mail will took 2 to 3 months) to
  636.  
  637.              Eduardo J. Salom
  638.              SoftWare Plus SA
  639.              Larrea 1218 - 2.A
  640.              (1117) Buenos Aires, CFE
  641.              Argentina
  642.  
  643.              The main and only activity of my company (SoftWare Plus)  is
  644.              the software development, our earnings depends of our sales,
  645.              we  believe  that  the shareware is a great idea as the user
  646.              can test the product before paying for  it  saving,  at  the
  647.              same time, the big chunk spent in advertising, packaging and
  648.              distribution  (about 70% of the retail price of a commercial
  649.              product)
  650.  
  651.              So, if you find this program, or any other shareware, useful
  652.              and keep using it please,  register as user an pay  for  it,
  653.              otherwise the shareware will starve and dissapear.
  654.  
  655.              Think  that the few bucks I request will pay only for a very
  656.              little fraction of the time spent to make this program.
  657.  
  658.              Thanks for you attention!
  659.  
  660.              Eduardo J. Salom
  661.  
  662.  
  663.                                           13
  664.