home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / zsus / z3help / f.lbr / FSPLIT.HZP / FSPLIT.HLP
Encoding:
Text File  |  1991-11-18  |  7.3 KB  |  163 lines

  1. ;
  2.                                  FSPLIT.COM                                   
  3.  
  4.              Size (recs) CRC   Version    Author/Latest Issue      Disk
  5.                4k (32)   C17A  1.0        Gene Pizzetta 1/91       Z3COM7
  6.  
  7.   1- Usage  2- Date Stamping  3- Errors  4- Config  5- Notes  6- Examples     
  8.  
  9.  
  10.    FSPLIT is a ZCPR3 utility that splits a file into  several pieces by record
  11. count,  by line count,  or at a marker character within the file.   Text files
  12. will not be split in the middle of a line,  but  object (binary) files will be
  13. split exactly on record boundaries.   Under ZDDOS and ZSDOS create date stamps
  14. are transferred to the new files.
  15. :1
  16.  
  17.     Syntax   FSPLIT {dir:}infile {dir:}{outfile} {{/}options}
  18.  
  19.    A source filename is required.   If no  destination filename is given,  the
  20. generated files will have the same name as the source file.   The filetypes of
  21. the destination files will begin with  001 and increment from there (002, 003,
  22. etc.).   If no  DIR or DU is given,  the current drive/user is assumed.  File-
  23. names beginning with a slash must be preceded by a DU specification.
  24.  Options - 1/4 
  25.  
  26.    If no outfile or destination directory is  given,  the options must be pre-
  27. ceded by a slash.
  28.  
  29.     nnn   Output file size in records or lines (in decimal).  As 
  30.           distributed, the default is 256, which is 32 kilobytes 
  31.           in records, or around 16 kilobytes in lines.
  32.  
  33.      R    Splits file by record (sector) count.  Unless the O 
  34.           option is given, the resulting files will be at least 
  35.           one record longer than the size given, because once the 
  36.           maximum file size is reached, FSPLIT will look for a 
  37.           line feed before making the split.  (As distributed, 
  38.           this is the default.)
  39.  
  40.      K    File size is in kilobytes.  This is not an alternate 
  41.           method, but merely multiplies the file size by 8.  It's 
  42.           intended to make command line entry of the file size a 
  43.           little easier.  If this option is given, the R option 
  44.           is also set automatically.
  45.  Options - 2/4 
  46.  
  47.      L    Splits file by line count.  Lines are counted by 
  48.           looking for line feeds, including line feeds with their 
  49.           high bit set that are sometimes found in WordStar 
  50.           document files.
  51.  
  52.      M    Splits the file when a ^P marker tag is found.  Markers 
  53.           can be placed in the file with a text editor and then 
  54.           FSPLIT used to divide the file at the marked locations. 
  55.           The combination is faster than allowing the editor 
  56.           itself to divide the file.
  57.  
  58.      T    Text file.  This option allows use of the L and M 
  59.           options.  The file is split only at the end of a line 
  60.           (see R, above) and the CP/M end-of-file character is 
  61.           observed.  (As distributed, this is the default.)
  62.  
  63.      O    Object (binary) file.  This option also sets the R 
  64.           option automatically and causes files to be split 
  65.           exactly on a record boundary.  The CP/M end-of-file 
  66.           character (^Z) is ignored.
  67.  Options - 3/4 
  68.  
  69.      Q    Toggles current quiet mode setting.  Quiet mode is set 
  70.           by the ZCPR3 quiet flag or by a configuration option.  
  71.           The quiet flag is given priority, if it is set.  Option 
  72.           Q toggles the current mode.
  73.  Options - 4/4 
  74.  
  75.    As distributed, FSPLIT defaults to options R and T.
  76.  
  77.    The output files will  usually  be  one record larger than the record count
  78. given on the command line because the file will not be  split until the end of
  79. the line being read when the maximum record count is reached and then at least
  80. one ^Z must be inserted.   Files  with  long  lines  exceeding 125 characters,
  81. however, may sometimes require two or more  records  beyond the maximum record
  82. count.  With the K option this overrun is partially compensated for by setting
  83. the record count at one less than the  maximum  required  for  the given kilo-
  84. bytes.
  85.  
  86.    With the O option the file is split  at the exact end of a record and no ^Z
  87. is inserted, so those files will always be the exact length requested.
  88.  
  89.    In most cases text files will be the  FSPLIT sources,   but occasionally it
  90. may be desirable to split a very large binary  (object) for storage or to move
  91. it on floppy disks to  another  machine.   In  those  cases  always  use the O
  92. option.  The resulting files can be re-combined using CONCAT or PIP with their
  93. O options.
  94. :2 
  95.  Date Stamping  
  96.  
  97.   If the original file has a create file stamp,  then the stamp will be trans-
  98. ferred to the new files.   Unlike some other  utilities,  a blank create stamp
  99. will not be transferred.   In that case,  if the original file has a modifica-
  100. tion date, that modification date will become the create date of the new file.
  101. Otherwise,  the new file's create stamp will be the current date.   Date stamp
  102. transfer will work only under ZSDOS and ZDDOS.
  103. :3
  104.  Errors  
  105.  
  106.    If "//" or a null command tail is given,  FSPLIT will display a brief usage
  107. message.   All other errors cause invocation of the error  handler,  if one is
  108. installed.   In addition,  the program error flag will be set to standard ZCPR
  109. 3.4 error codes:  
  110.  
  111.     2, invalid directory
  112.     8, ambiguous or missing filename
  113.     9, bad numerical expression
  114.    10, source file not found
  115.    11, disk full
  116.    12, insufficient memory
  117.    19, invalid option
  118.     4, any other error
  119. :4
  120.  Configuration 
  121.  
  122.    Any of  FSPLIT's  command  line  options,  except option K, can be made the
  123. defaults by using ZCNFG and  the  configuration  file,  FSPLITnn.CFG.   Do not
  124. change the name of the CFG file or ZCNFG will not be able to find it  automat-
  125. ically.
  126.  
  127.    Configuration options are explained in detail on the ZCNFG help screens.
  128. :5
  129.  FSPLIT Notes 
  130.  
  131.    a. FSPLIT is based on SPLIT45.  Although  SPLIT45 is very versatile,  it is
  132.       cumbersome to use for simple  file  splitting  and it does not recognize 
  133.       user areas.   A command-line driven file  splitter was needed that could 
  134.       be configured for most common uses and be quick and simple to use.   And
  135.       it had to be a Z utility, of course.
  136. :6
  137.  Examples of Use - 1/2 
  138.  
  139.      a. fsplit att5ess.man /64k
  140.           Splits ATT5ESS.MAN into multiple files of 64 kilobytes 
  141.           each, named ATT5ESS.001, ATT5ESS.002, etc.
  142.  
  143.      b. fsplit att5ess.man b3:5ess-man 512
  144.           Splits ATT5ESS.MAN into multiple files of about 512 
  145.           records each in directory B3, named 5ESS-MAN.001, 5ESS- 
  146.           MAN.002, etc.
  147.  
  148.      c. fsplit fileman.mmp a: 336ko
  149.           Splits binary file FILEMAN.MMP into multiple files of 
  150.           336 kilobytes each on drive A, named FILEMAN.001, 
  151.           FILENAM,002, etc.
  152.  
  153.      d. fsplit gwtw.txt /l
  154.           Splits GWTW.TXT into multiple files of 256 lines (the 
  155.           default) in the current directory, named GWTW.001, 
  156.           GWTW.002, etc.
  157.  Examples of Use - 2/2 
  158.  
  159.      e. fsplit edit:mybook.txt chapter /m
  160.           Splits MYBOOK.TXT in named directory EDIT each time a 
  161.           ^P is found into multiple files in the current 
  162.           directory, named CHAPTER.001, CHAPTER.002, etc.
  163.