PURPOSE OPERATION UNSPLIT OPERATION OPTIONS COMMAND LINES RELATED PROGRAMS
One liner: Splits large fixed length record files into manageable/sample pieces..
12/2024 the -t option was added. It allows the output of the -tail of a file.
As of 8/2008 the operation of split has been modified. The split command help screen should be consulted for uptodate operation.
Splits a file into
equal parts. This is useful when you have a large data file
and need to split it to 64000 lines so that it will be imported cleanly
into older versions of Excel (which have a 64000 line limit per page).
Splits a file into
equal parts based on a fixed record length file format.
UNSPLT (no longer supported) will take the pieces off of the floppies and place them back into a single file on the hard drive. Unsplit reverses the action of split.
SPLIT will split a file into smaller pieces for easier manipulation and testing of it pieces.
Similar to the basic FILSPLIT program, but the splitting is automatic, so that you do not have to retype the command line for each section you create.
One of the options will let you split a large text (or tsv delimited) file into smaller pieces. You can use thesesmaller (generally 60000 line) pieces which can then be easily loaded into Excel.
If you have a fixed length record file, you can use a record length to ensure that the split ends on a record boundary. This allows the program can cleanly split a normal file into pieces that will fit evenly (without records being split).
The record length is only used to insure that IF you wanted to use any one disk as a standalone piece of the file, it would be a complete piece.
NO
LONGER SUPPORTED:
Following are the UNSPLIT routines:
Unsplit can be used as a simply pack program to pack files together one after the other.
It is designed to be used with the outputs from the split program, but will do other things also.
Since split sequentially numbers the output file extensions from 001 to xxx,it then follows that the unsplit routine will look for files with the same filename and extensions from 1 to xxx.
If your output files do not have sequential extensions then you will have to do that before running unsplit.
C:>split_1 input [-r recl] [-l number or records/lines per file]
C:>split_1 input -r 80 -l 10000 (use -r only for fixed length records)
C:>split inputfile -l 64000
C:>split_1 input -r recl -l number of records/lines per output file -m number_output_files
split -r 100 -l 10 -m 25
C:>split_1 input -r recl -l number of records/lines per output file -t (records from end/tail of file)
split -r 100 -l 10 -t
The output files are sequentially numbered from 001-XXX to
designate which split it is, and will each contain xxxxxx lines of
text.
The filename of the output is the filename of the input with the
extension changed.
.
-r recl: Record length of input record.
Should be actual record length. DO NOT USE this option if you are
splitting text files.
-l + number of records: If the file is fixed length records, then this many records to each output. If the file is a text file, this many lines to the output. .
-m + number of output files: Use this to only create xx number of output files. I.E. -m 10 will only create 10 output files. (Mutually exclusive with -t option)
-t: tail of the input. Based on the record length -r, this -tail option will create a single (that means 1) output file of -l number of records. Mutually exclusive with the -m. Meaning if -t is used, the -m is ignored and only a single output file of -r records from the -tail of the file.