TOMULTI.EXE Utility
TOMULTI.EXE is a utility program used to split a single text file into multiple text files. The output files to which TOMULTI will write are configured in the definition file. This file associates record identifiers (called tags) with a particular output file. The definition file is read by TOMULTI prior to processing the input file. TOMULTI then scans the input file looking for the record IDs defined in the definition file and, if found, writes that record to the associated output file.
The following shows the command line syntax:
tomulti [<InputFile>] [<DefinitionFile>] [-D]For example:
tomulti purchaseorder.txt purchaseorder.def
| Parameter | Definition |
|---|---|
| InputFile | The name of the file to be split into multiple files. |
| DefinitionFile | A file containing the names of the output files and the list of record IDs associated with those output files. It may also contain the start position of the record IDs within a record. The start position of a record ID defaults to 1 (the beginning) if this information is not supplied. |
| -D | This option instructs TOMULTI to delete the record IDs from the record before writing it to the output file. This is an optional command line argument. |
The definition file contains a list of output files and a comma-separated list of record IDs associated with those output files. It can, optionally, contain the start position of each record ID. This allows record IDs to be embedded within a record rather than at the very beginning of a record. A colon is used to separate the record ID from the record ID start position. The start position of a record ID defaults to 1 (the beginning) if this information is not supplied.
The following shows the definition file layout:
[OutputFile1],[RecordID]:[RecordIDStartPosition] ,..up to 30 rec IDs
[OutputFile2],[RecordID]:[RecordIDStartPosition] ,..up to 30 rec IDsExample Scenario
Definition File (purchaseorder.def)
C:\Dropoff\Accounting.txt,BEG,DTM, PO1,PID,ITA,CTT
C:\ Dropoff\CustomerInfo.txt, N1,N3,N4Input File (purchaseorder.txt)
BEG*01*02*10000654321**000704~
DTM*002*000730~
N1*ST*DENIM JEAN CO~
N3*501 BLUEJEAN WAY *505 LOOSEFIT DRIVE ~
N4*LEVI*AZ*86005~
PO1*0123456789*10*EA*15**BP*555666411~
PID*A****FLARE BOTTOM JEANS~
ITA*A***CC***1000~
CTT*1~Command Line
Tomulti.exe purchaseorder.txt purchaseorder.defResulting Output File for C:\Dropoff\Accounting.txt
BEG*01*02*10000654321**000704~
DTM*002*000730~
PO1*0123456789*10*EA*15**BP*555666411~
PID*A****FLARE BOTTOM JEANS~
ITA*A***CC***1000~
CTT*1~Resulting Output File for C:\ Dropoff\CustomerInfo.txt
N1*ST*DENIM JEAN CO~
N3*501 BLUEJEAN WAY *505 LOOSEFIT DRIVE ~
N4*LEVI*AZ*86005~