Working with fixed format text db's
Frank Swarbrick
infocat at earthlink.net
Fri Jun 8 22:11:11 EDT 2007
Neil Cerutti wrote:
> The underlying problem, of course, is the archaic flat-file
> format with fixed-width data fields. Even the Department of
> Education has moved on to XML for most of it's data files, which
> are much simpler for me to parse.
XML easier to parse than fixed position file. Wow!
Very likely this file is created by a COBOL program, because this is
what COBOL loves.
01 my-record.
05 ssn pic 9(9).
05 id pic 9(10).
05 last-name pic x(16).
05 first-name pic x(11).
05 phone-nbr pic 9(10).
05 filler pic x(1254).
05 filler pic x(6) value '2813'.
05 major pic x(5).
write my-record
Haha. I'm just amused that new languages make simpler some things that
were hard in older languages, but in turn make more difficult things
that were simple!
Frank
COBOL expert/Python newbie
More information about the Python-list
mailing list