FSPLIT Version 1.0 Gene Pizzetta January 8, 1991 FSPLIT is a ZCPR3 utility that splits a file into several pieces by record count, by line count, or at a marker character within the file. Text files will not be split in the middle of a line, but object (binary) files will be split exactly on record boundaries. Under ZDDOS and ZSDOS create date stamps are transferred to the new files. USAGE: FSPLIT {dir:}infile {dir:}{outfile} {{/}options} A source filename is required. If no destination filename is given, the generated files will have the same name as the source file. The filetypes of the destination files will begin with 001 and increment from there (002, 003, etc.). If no DIR or DU is given, the current drive/user is assumed. Filenames beginning with a slash must be preceded by a DU specification. OPTIONS: If no outfile or destination directory is given, the options must be preceded by a slash. nnn Output file size in records or lines (in decimal). As distributed, the default is 256, which is 32 kilobytes in records, or around 16 kilobytes in lines. R Splits file by record (sector) count. Unless the O option is given, the resulting files will be at least one record longer than the size given, because once the maximum file size is reached, FSPLIT will look for a line feed before making the split. (As distributed, this is the default.) K File size is in kilobytes. This is not an alternate method, but merely multiplies the file size by 8. It's intended to make command line entry of the file size a little easier. If this option is given, the R option is also set automatically. L Splits file by line count. Lines are counted by looking for line feeds, including line feeds with their high bit set that are sometimes found in WordStar document files. M Splits the file when a ^P marker tag is found. Markers can be placed in the file with a text editor and then FSPLIT used to divide the file at the marked locations. The combination is faster than allowing the editor itself to divide the file. T Text file. This option allows use of the L and M options. The file is split only at the end of a line (see R, above) and the CP/M end-of-file character is observed. (As distributed, this is the default.) O Object (binary) file. This option also sets the R option automatically and causes files to be split exactly on a record boundary. The CP/M end-of-file character (^Z) is ignored. Q Toggles current quiet mode setting. Quiet mode is set by the ZCPR3 quiet flag or by a configuration option. The quiet flag is given priority, if it is set. Option Q toggles the current mode. As distributed, FSPLIT defaults to options R and T. The output files will usually be one record larger than the record count given on the command line because the file will not be split until the end of the line being read when the maximum record count is reached and then at least one ^Z must be inserted. Files with long lines exceeding 125 characters, however, may sometimes require two or more records beyond the maximum record count. With the K option this overrun is partially compensated for by setting the record count at one less than the maximum required for the given kilobytes. With the O option the file is split at the exact end of a record and no ^Z is inserted, so those files will always be the exact length requested. In most cases text files will be the FSPLIT sources, but occasionally it may be desirable to split a very large binary (object) for storage or to move it on floppy disks to another machine. In those cases always use the O option. The resulting files and be re-combined using CONCAT or PIP with their O options. EXAMPLES: fsplit att5ess.man /64k Splits ATT5ESS.MAN into multiple files of 64 kilobytes each, named ATT5ESS.001, ATT5ESS.002, etc. fsplit att5ess.man b3:5ess-man 512 Splits ATT5ESS.MAN into multiple files of about 512 records each in directory B3, named 5ESS-MAN.001, 5ESS- MAN.002, etc. fsplit fileman.mmp a: 336ko Splits binary file FILEMAN.MMP into multiple files of 336 kilobytes each on drive A, named FILEMAN.001, FILENAM,002, etc. fsplit gwtw.txt /l Splits GWTW.TXT into multiple files of 256 lines (the default) in the current directory, named GWTW.001, GWTW.002, etc. fsplit edit:mybook.txt chapter /m Splits MYBOOK.TXT in named directory EDIT each time a ^P is found into multiple files in the current directory, named CHAPTER.001, CHAPTER.002, etc. DATE STAMPING: If the original file has a create file stamp, then the stamp will be transferred to the new files. Unlike some other utilities, a blank create stamp will not be transferred. In that case, if the original file has a modification date, that modification date will become the create date of the new file. Otherwise, the new file's create stamp will be the current date. Date stamp transfer will work only under ZSDOS and ZDDOS. ERRORS: If "//" or a null command tail is given, FSPLIT will display a brief usage message. All other errors cause invocation of the error handler, if one is installed. In addition, the program error flag will be set to standard ZCPR 3.4 error codes: 2, invalid directory; 8, ambiguous or missing filename; 9, bad numerical expression; 10, source file not found; 11, disk full; 12, insufficient memory; 19, invalid option; or 4, any other error. CONFIGURATION: Any of FSPLIT's command line options, except option K, can be made the defaults by using ZCNFG and the configuration file, FSPLITnn.CFG. Do not change the name of the CFG file or ZCNFG will not be able to find it automatically. Configuration options are explained in detail on the ZCNFG help screens. HISTORY: Although SPLIT45 is very versatile, it is cumbersome to use for simple file splitting and it does not recognize user areas. I decided I wanted a command-line driven file splitter that could be configured for my most common uses so it would be quick and simple to use. And it had to be a Z utility, of course. Version 1.0 -- January 8, 1991 -- Gene Pizzetta Initial release. Please report bugs and feel free to make suggestions. Gene Pizzetta 481 Revere Street Revere, MA 02151 Newton Centre Z-Node: (617) 965-7259 Ladera Z-Node Central: (213) 670-9465 GEnie: E.PIZZETTA Voice: (617) 284-0891