home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / DBASE / STRPDAT.ZIP / STRIPIT.DOC < prev    next >
Text File  |  1992-01-11  |  5KB  |  117 lines

  1. *:::::::::::::::::::::::::::[ DISCLAIMER ]:::::::::::::::::::::::::::::::::*
  2.  
  3. STRIPIT.EXE by Bill Shields is released to public domain.
  4.  
  5. STRIPIT.EXE is provided AS IS without any warranty,  expressed or implied.
  6. This  includes  without  limitation  the  fitfulness  to  a particular
  7. purpose or application and any warranties of merchantability.  While I tried
  8. to be as thorough as  possible while  debugging STRIPIT.EXE, I shall  not  be
  9. liable for any damages, whether direct, indirect, special,  or  consequential
  10. arising  from a failure of STRIPIT.EXE to operate in a manner desired by the
  11. user. I shall  not be  liable for  any damage to data or property which may
  12. by caused directly or indirectly  by use of STRIPIT.EXE.
  13.  
  14. In no event will I be liable to you for any damages, including any lost
  15. profits, lost savings or  other incidental or consequential  damages arising
  16. out of your use or inability to use the program, or for any claim by any
  17. other party.
  18.  
  19. *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*
  20.  
  21. STRIPIT will take a text file and convert it into a comma delimited file.  
  22. The text file is assumed to have multiple records, i.e.,
  23.  
  24. RECORD 1
  25. RECORD 2
  26. RECORD 3
  27. RECORD 1
  28. RECORD 2
  29. RECORD 3
  30.  
  31. would be converted to
  32.  
  33. "RECORD 1","RECORD 2","RECORD 3"
  34. "RECORD 1","RECORD 2","RECORD 3"
  35.  
  36. Support is provided for *2* different size records (based on STRIPIT command 
  37. line).
  38.  
  39. ============================================================================
  40. A CLIPPER Demo program "DATA.EXE" is provided for adding, editing, deleting,
  41. viewing, and printing data imported from the "DATA" file.  Examine the DATA 
  42. file and run this program to see what STRIPIT.EXE does.  
  43.  
  44. 1) Edit EDITOR.BAT to reflect your favorite editor (if you want to view/edit
  45.    the STRIPIT output files).
  46. 2) EXECUTE "DATA.EXE" (Clipper program)
  47. 3) Try the various options saving option 1. for last (to see there is nothing
  48.    there until STRIPIT creates it).
  49. ============================================================================
  50.  
  51. The following command line generates two comma-delimited data files from
  52. the "DATA" file.
  53.  
  54. STRIPIT /I:C:^Q: /S:A: /L:41 /C:20^22^N
  55.  
  56. The above reads in a file called "DATA" and generates  "DATA.PRI" 
  57. and "DATA.ALT" (primary and alternate) files.  The primary file 
  58. contains SYSOPS and the alt contains non-SYSOPS.  I decided not to 
  59. go with a configuration file or filenames on the command line to 
  60. reduce overhead.  The above will look less intimidating after the 
  61. following explanation.
  62.  
  63. DELIMITER = ^
  64.  
  65. If you specify more then one parameter for a switch you must 
  66. delimit them with the caret.  I picked this character because it 
  67. will be the least likely used in text files.  Any other character 
  68. ran the risk of "tricking" the program into thinking it was a 
  69. delimiter.
  70.  
  71. SWITCHS
  72.  
  73. /C:P1^P2^P3       Check line.  This must be supplied the following 3 
  74.                   parameters:
  75.                   P1 ... Offset, from line 1 of each record in the 
  76.                          text file, that holds conditional check.  
  77.                          For our above example, line 20 is the 
  78.                          response to "Are you a sysop".
  79.                   P2 ... If the condition is true then this is the 
  80.                          *NEW* number of lines for this record only.
  81.                   P3 ... String to compare to text at line offset 
  82.                          P1.  In our example this will compare line 
  83.                          20 to "N".  If line 20 is "naaa", "no", 
  84.                          "Nope","Never", etc, it will cause the 
  85.                          program to default to the new record size 
  86.                          of 22.   After this record is processed (in 
  87.                          the alternate file) the program returns to 
  88.                          the primary file using the default record 
  89.                          length supplied with the switch /L:
  90.                          Note: Length is not limited to one 
  91.                                character.
  92.  
  93. /I:[string][...]  Ignore line.  This will cause the program to 
  94.                   ignore any line that starts with the specified 
  95.                   string.  In the above example all lines that start 
  96.                   with 'C:' and 'Q:' will be ignored (won't be comma 
  97.                   delimited).
  98.  
  99. /L:[len]          Length of record (in lines).  This is the only 
  100.                   *MANDATORY* switch.  This tell the program how 
  101.                   many lines each record will be.  In our example
  102.                   (your data file) the record is 41 lines.  
  103.  
  104. /S:[string][...]  Skip these characters.  This will cause the 
  105.                   program to skip past characters that *start* the 
  106.                   line with 'string'.  In the above example all 
  107.                   lines that start with "A:" will have the "A:" 
  108.                   striped off (or skipped).  This will result in 
  109.                   only the responses being used.
  110.  
  111. NOTE: All blank characters are stripped from the left hand side of 
  112. strings prior to comma-delimiting them, i.e. "  string" would be 
  113. converted to "string".
  114.  
  115.  
  116.  
  117.