How to read files written with COBOL

asdf sdf asdf at asdf.com
Tue May 11 12:12:44 EDT 2004


Steve Williams wrote:

> I wrote an ETL system in python for a client to convert from Microfocus 
> COBOL to DB2.  Here are some of the problems I saw:
> 
> 1)  COBOL has a very rich set of datatypes defined by the PICTURE clause
<...snipping various items...>

>     That is, I took the original COBOL 01 level definition and
>     converted it to a list with definition parameters name, type,
>     length, decimal point, etc. to make it easy for Python and
>     to add some stuff to make DB2 happy (convert to title case. . .)
Steve,

I've been looking for ideas on getting at DB2 and Adabas from Python. 
You might have some thoughts.

Is it feasible to go to directly to MVS/DB2/Adabas from Python on Unix 
or Win?

Is it more realistic to hit DB2 on AIX or Linux and use some kind of DB2 
  linking or replication to reach DB2/MVS?

Other ideas?  Maybe 3270 emulation with screen scraping?  How about 
telnet 3270?  (Hundreds years of ago, I could dial into a command line 
MVS environment.)

I don't mean to hijack the thread.  I think this is related and might be 
helpful to unfortunates to have to interoperate with legacy systems.










More information about the Python-list mailing list