CSVfox
Leverage Your Data.
 English

+fixed

Define fixed Field Lengths when reading a TEXT or RECORD input File

Description

This command is meant only for TEXT or RECORD input files.
It has no relevance for CSV files.

These file types consist of records of fixed field lengths. The +fixed command lists the width of each field that together form the data record.
The record may not only contain valid data, but also contain unused areas or padding that that should not be interpreted as data fields. They also have a width.
The sum of all widths (data and unused) give the record length.

Unused areas must be marked with a colon (:) and will not be read as valid data fields.

Pattern

+fixed=n1,n2,n3...

Usage Examples

csvfox infile.txt +e=ASCII +fileype=TEXT +fixed=10,30,30,:2,5,20,35,4,:16 outfile.csv
Reads infile.txt as a fixed-width ASCII-encoded text file, with one data record on each line.
Its first field has the width of 10 characters, then come two fields with a width of 30 characters each.
Then there is a gap of two characters whose content is to be ignored.
After this, follow some fields with a width of 5, 20, and 35 characters, and at last a field with a width of 4 characters.
The record is also padded with 16 characters at the end.
All valid fields will be written in standard CSV format to outfile.csv in default encoding.
Under construction, coming soon