Little direction please Python MySQL

Ethan Furman ethan at stoneleaf.us
Sat Nov 15 14:41:17 EST 2008


len wrote:
> On Nov 13, 7:32 pm, Ethan Furman <et... at stoneleaf.us> wrote:
> 
>>len wrote:
>>
>>>Hi all;
>>
>>[snip]
>>
>>
>>>Here is my problem.  I need to start doing this in the really world at
>>>my company converting some older cobol system and data to python
>>>programs and MySQL.  I have gotten past packed decimal fields and
>>>various other little tidbits.  My problem is the data files aren't
>>>little three of four field files but Customer File with 98 fields
>>>etc.  I understand building dictionaries and building with zip and I
>>>have even seen a reference to using __setattr__ in an empty class but
>>>I'm having a hard time moving past the little code snippts to real
>>>code.
>>
>>[snip]
>>
>>
>>>Thanks Len
>>
>>I've never had the (mis?)fortune to work with COBOL -- what are the
>>files like?  Fixed format, or something like a dBase III style?  I
>>presume also that you only need access to them in COBOL format long
>>enough to transfer them into MySQL -- true?
>>
>>~ethan~
> 
> 
> Files are fixed format no field delimiters, fields are position and
> length
> records are terminated by newline.  In cobol the read statement which
> read
> a record from the file automaticly mapped the date to the fieldnames
> in
> the cobol file definition.

[snip]

> 
> Len

Are the cobol file definitions available in a file that can be parsed, 
or are they buried in the source code?

What type of data is in the files?  Integer, float, character, date, etc.

Once you have the data out, will you need access these same cobol files 
in the future?  (i.e. more data is being added to them that you will 
need to migrate)

~ethan~



More information about the Python-list mailing list