PURPOSE OPERATION COMMAND LINES OPTIONS RELATED PROGRAMS
Author: Dan Mares, dmares @ maresware . com (you will be asked for e-mail address confirmation)
Portions Copyright © 1998-2021 by Dan Mares and Mares and Company, LLC
Phone: 678-427-3275
Last update: 2021-02-06
All programs are command line programs.
MUST be run within a command window as administrator.
To find the record length of fixed length files.
The files must not have any footers or headers that are NOT identicle record lengths of the data.
The files must not have any “padding” at the end of the file.
If the files are carriage return delimited, the carriage return will dictate the file size.
If the files are pipe (|) delimeted, an option is available for findrecl to include a list of field locations
This program counts the characters (up to 32768) in an input file, and tells you at which intervals it finds an end of record symbol. In hexadecimal format the end of record symbol is an 0x0a.
Findrecl will also tell you if it finds an 0X0D 0X0A in the record, which indicates a WINDOWS/DOS carriage return pair.
If the file contains fixed length records, the program will attempt to find the record length of fixed length records that do not have carriage return delimiters.
It performs an analysis and prints what it thinks are possible record lengths. You then select your choices from the possibilities presented. This analysis works best on files that are sorted. It attempts to find the location of the key field while doing its analysis.
It will count up to 10 records by default unless you ask it to stop.
If the third item on the command line is a number, it will check this many records for carriage return pairs.
If the record length of the file is very large (i.e., greater than 500 characters per record) then this program may not work correctly.
IF and I stress IF, the records are pipe (|) delimited a command line format (shown below) can tell the program to find the location of each delimiter and produce a list of the locations (from 1) of each delimiter. This list can be re-directoed > to a file for retention and review. This process also places in this file, a copy of the first record of the data for review and confirmation of its findings.
Will attempt to find the record length of the fixed records in junk.
C:> findrecl junk 40
Will list the record length of the first 40 records that are carriage return line feed delimited.
c:> findrecl junk > file_stats.txt
This format is ONLY available for pipe delimited fixed length data.
This creates an output file called file_stats.txt which contains data similar to shown here. Record content blanks removed in this display
for legibility.
Checking fields in filename: junk First record --------------------- D:\WORK\C70\FINDRECL\release\Accting.obj | 8397E08981ED6C13666CA10D58F65F93| 20153|03/26/2020|13:03:33:810c|02/06/2021|16:46:03:768w|02/06/2021|16:46:03:768a|EST| A...... ------------------ Record len: 234 From position 1 from 0 Field 1: D:\WORK\C70\FINDRECL\release\Accting.obj << TRUNCATED Pipe at 81 80 | 8397E08981ED6C13666CA10D58F65F93<<-42 Pipe at 123 122 | 20153<<-22 Pipe at 145 144 |03/26/2020<<-11 Pipe at 156 155 |13:03:33:810c<<-14 Pipe at 170 169 |02/06/2021<<-11 Pipe at 181 180 |16:46:03:768w<<-14 Pipe at 195 194 |02/06/2021<<-11 Pipe at 206 205 |16:46:03:768a<<-14 Pipe at 220 219 |EST<<-4 Pipe at 224 223 | A......<<-9EORThe field is shown with its pipe (|) as the first item of the field, and the <<-xx value indicates the end of the field, and length.
None